Philips PNX8550 ip3106 driver deadlock fix
PATCH 1/1 Philips PNX8550 ip3106 driver deadlock fix
Hello Ralf,
This is a patch that fixes spin_lock deadlock in serial ip3106 driver.
The spin_lock_irq(&port->lock,flags) is already called in generic driver serial_core.c before port->ops->start_tx().
So the second call of spin_lock_irq(&port->lock, flags) leads to deadlock. This could be verified in PREEMPT_DESCTOP case when these options are enabled:CONFIG_DEBUG_PREEMPT=yCONFIG_DEBUG_SPINLOCK=y
Vladimir
drivers/serial/ip3106_uart.c +0 -5
@@ -149,19 +149,14 @@ static void ip3106_stop_tx(struct uart_pstatic void ip3106_start_tx (struct uart_port *port,unsigned int tty_start) {struct ip3106_port *sport = (struct ip3106_port *)port; -unsigned long flags;u32 ien; -spin_lock_irqsave (&sport->port.lock, flags); -/* Clear all pending TX intr */ serial_out (sport,IP3106_ICLR ,IP3106_UART_INT_ALLTX );/* Enable TX intr */ ien =serial_in (sport,IP3106_IEN );serial_out (sport,IP3106_IEN , ien |IP3106_UART_INT_ALLTX ); - -spin_unlock_irqrestore (&sport->port.lock, flags); }/*
Quoted 9 lines · Vladimir A. Barinov
This is a patch that fixes
spin_lockdeadlock in serial ip3106 driver. Thespin_lock_irq(&port->lock,flags)is already called in generic driverserial_core.cbeforeport->ops->start_tx().
So the second call ofspin_lock_irq(&port->lock, flags)leads to deadlock. This could be verified inPREEMPT_DESCTOPcase when these options are enabled:CONFIG_DEBUG_PREEMPT=yCONFIG_DEBUG_SPINLOCK=y
Serial drivers are maintained by [email protected], please send to him.
Ralf
Quoted 14 lines · Ralf Baechle
Quoted 9 lines · Vladimir A. Barinov
This is a patch that fixes
spin_lockdeadlock in serial ip3106 driver.
Thespin_lock_irq(&port->lock,flags)is already called in generic driverserial_core.cbeforeport->ops->start_tx().
So the second call ofspin_lock_irq(&port->lock, flags)leads to deadlock. This could be verified inPREEMPT_DESCTOPcase when these options are enabled:CONFIG_DEBUG_PREEMPT=yCONFIG_DEBUG_SPINLOCK=y
Quoted 4 lines
Serial drivers are maintained by [email protected], please send to him.
Ok, thank you.
Quoted 5 lines
Ralf