* [PATCH] Philips PNX8550 ip3106 driver deadlock fix
@ 2005-12-06 17:54 Vladimir A. Barinov
2005-12-06 18:00 ` Ralf Baechle
0 siblings, 1 reply; 3+ messages in thread
From: Vladimir A. Barinov @ 2005-12-06 17:54 UTC (permalink / raw)
To: ralf; +Cc: linux-mips, ppopov
[-- Attachment #1: Type: text/plain, Size: 415 bytes --]
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=y
CONFIG_DEBUG_SPINLOCK=y
Vladimir
[-- Attachment #2: ip3106_uart.diff --]
[-- Type: text/plain, Size: 729 bytes --]
--- linux-2.6.15/drivers/serial/ip3106_uart.c 2005-12-02 16:37:59.000000000 +0300
+++ linux-2.6.15/drivers/serial/ip3106_uart.c 2005-12-06 20:40:15.000000000 +0300
@@ -149,19 +149,14 @@ static void ip3106_stop_tx(struct uart_p
static 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);
}
/*
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Philips PNX8550 ip3106 driver deadlock fix
2005-12-06 17:54 [PATCH] Philips PNX8550 ip3106 driver deadlock fix Vladimir A. Barinov
@ 2005-12-06 18:00 ` Ralf Baechle
2005-12-06 18:03 ` Vladimir A. Barinov
0 siblings, 1 reply; 3+ messages in thread
From: Ralf Baechle @ 2005-12-06 18:00 UTC (permalink / raw)
To: Vladimir A. Barinov; +Cc: linux-mips, ppopov
On Tue, Dec 06, 2005 at 08:54:36PM +0300, Vladimir A. Barinov wrote:
> 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=y
> CONFIG_DEBUG_SPINLOCK=y
Serial drivers are maintained by rmk+serial@arm.linux.org.uk, please send
to him.
Ralf
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Philips PNX8550 ip3106 driver deadlock fix
2005-12-06 18:00 ` Ralf Baechle
@ 2005-12-06 18:03 ` Vladimir A. Barinov
0 siblings, 0 replies; 3+ messages in thread
From: Vladimir A. Barinov @ 2005-12-06 18:03 UTC (permalink / raw)
To: Ralf Baechle; +Cc: linux-mips, ppopov
Ralf Baechle wrote:
>On Tue, Dec 06, 2005 at 08:54:36PM +0300, Vladimir A. Barinov wrote:
>
>
>
>>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=y
>>CONFIG_DEBUG_SPINLOCK=y
>>
>>
>
>Serial drivers are maintained by rmk+serial@arm.linux.org.uk, please send
>to him.
>
>
Ok, thank you.
> Ralf
>
>
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-12-06 18:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-06 17:54 [PATCH] Philips PNX8550 ip3106 driver deadlock fix Vladimir A. Barinov
2005-12-06 18:00 ` Ralf Baechle
2005-12-06 18:03 ` Vladimir A. Barinov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox