From: Jan Dittmer <jdittmer@ppp0.net>
To: James Nelson <james4765@verizon.net>
Cc: kernel-janitors@lists.osdl.org, linux-kernel@vger.kernel.org,
akpm@osdl.org
Subject: Re: [PATCH] esp: Make driver SMP-correct
Date: Fri, 31 Dec 2004 10:45:30 +0100 [thread overview]
Message-ID: <41D51FBA.2040002@ppp0.net> (raw)
In-Reply-To: <20041231014403.3309.58245.96163@localhost.localdomain>
James Nelson wrote:
> static inline int serial_paranoia_check(struct esp_struct *info,
> char *name, const char *routine)
> {
> @@ -209,34 +197,38 @@
> struct esp_struct *info = (struct esp_struct *)tty->driver_data;
> unsigned long flags;
>
> - if (serial_paranoia_check(info, tty->name, "rs_stop"))
> - return;
> + spin_lock_irqsave(&info->irq_lock, flags);
> +
> + if (unlikely(serial_paranoia_check(info, tty->name, __FUNCTION__)))
> + goto out;
> static void rs_start(struct tty_struct *tty)
> {
> struct esp_struct *info = (struct esp_struct *)tty->driver_data;
> unsigned long flags;
> -
> - if (serial_paranoia_check(info, tty->name, "rs_start"))
> - return;
> -
> - save_flags(flags); cli();
> +
> + spin_lock_irqsave(&info->irq_lock, flags);
> +
> + if (unlikely(serial_paranoia_check(info, tty->name, __FUNCTION__)))
> + goto out;
> +
This will deadlock. serial_paranoia_check also unconditionally tries to
take the lock.
Jan
next prev parent reply other threads:[~2004-12-31 9:46 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-31 1:43 [PATCH] esp: Make driver SMP-correct James Nelson
2004-12-31 9:45 ` Jan Dittmer [this message]
2004-12-31 9:46 ` Andrew Morton
2004-12-31 10:00 ` Russell King
2004-12-31 11:00 ` Jim Nelson
2004-12-31 17:01 ` Russell King
2004-12-31 22:16 ` [KJ] " Jim Nelson
2005-01-01 0:01 ` Gene Heskett
2005-01-01 0:13 ` Russell King
2005-01-01 1:14 ` Gene Heskett
2005-01-01 1:33 ` Russell King
2005-01-01 1:49 ` Jim Nelson
2005-01-01 1:35 ` Gene Heskett
2005-01-01 1:47 ` Jim Nelson
2005-01-01 3:11 ` Gene Heskett
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=41D51FBA.2040002@ppp0.net \
--to=jdittmer@ppp0.net \
--cc=akpm@osdl.org \
--cc=james4765@verizon.net \
--cc=kernel-janitors@lists.osdl.org \
--cc=linux-kernel@vger.kernel.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