From: "Vladimir A. Barinov" <vbarinov@ru.mvista.com>
To: ralf@linux-mips.org
Cc: linux-mips@linux-mips.org, ppopov@embeddedalley.com
Subject: [PATCH] Philips PNX8550 ip3106 driver deadlock fix
Date: Tue, 06 Dec 2005 20:54:36 +0300 [thread overview]
Message-ID: <4395D05C.9060408@ru.mvista.com> (raw)
[-- 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);
}
/*
next reply other threads:[~2005-12-06 17:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-06 17:54 Vladimir A. Barinov [this message]
2005-12-06 18:00 ` [PATCH] Philips PNX8550 ip3106 driver deadlock fix Ralf Baechle
2005-12-06 18:03 ` Vladimir A. Barinov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4395D05C.9060408@ru.mvista.com \
--to=vbarinov@ru.mvista.com \
--cc=linux-mips@linux-mips.org \
--cc=ppopov@embeddedalley.com \
--cc=ralf@linux-mips.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox