From: Russell King <rmk@arm.linux.org.uk>
To: Albert Cranford <ac9410@attbi.com>
Cc: Linus Torvalds <torvalds@transmeta.com>,
Linux Kernel List <linux-kernel@vger.kernel.org>
Subject: Re: [patch 3/4] 2.5.31 i2c updates
Date: Wed, 14 Aug 2002 09:55:15 +0100 [thread overview]
Message-ID: <20020814095514.A2777@flint.arm.linux.org.uk> (raw)
In-Reply-To: <3D57BEDE.8F868A5E@attbi.com>; from ac9410@attbi.com on Mon, Aug 12, 2002 at 09:57:50AM -0400
On Mon, Aug 12, 2002 at 09:57:50AM -0400, Albert Cranford wrote:
> @@ -121,12 +118,12 @@
> int timeout = 2;
>
> if (irq > 0) {
> - cli();
> + spin_lock_irq(&irq_driver_lock);
> if (pcf_pending == 0) {
> interruptible_sleep_on_timeout(&pcf_wait, timeout*HZ );
> } else
> pcf_pending = 0;
> - sti();
> + spin_unlock_irq(&irq_driver_lock);
In case you didn't get my previous message, sleeping with spinlocks held
is the perfect path to deadlock. Also, scheduling with interrupts disabled
is not a good idea. Unfortunately the code above does both.
--
Russell King (rmk@arm.linux.org.uk) The developer of ARM Linux
http://www.arm.linux.org.uk/personal/aboutme.html
prev parent reply other threads:[~2002-08-14 8:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-12 13:57 [patch 3/4] 2.5.31 i2c updates Albert Cranford
2002-08-14 8:55 ` Russell King [this message]
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=20020814095514.A2777@flint.arm.linux.org.uk \
--to=rmk@arm.linux.org.uk \
--cc=ac9410@attbi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
/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