From: Russell King <rmk@arm.linux.org.uk>
To: linux-kernel@vger.kernel.org
Cc: Linus Torvalds <torvalds@transmeta.com>
Subject: free_irq
Date: Sun, 29 Sep 2002 14:15:50 +0100 [thread overview]
Message-ID: <20020929141550.A15924@flint.arm.linux.org.uk> (raw)
Hi,
The comments surrounding free_irq() include these line:
* On a shared IRQ the caller must ensure the interrupt is disabled
* on the card it drives before calling this function. The function
* does not return until any executing interrupts for this IRQ
* have completed.
*
* This function may be called from interrupt context.
This last line is quite bogus.
- if we call this function to free IRQ "n" from an interrupt handler
running on IRQ "n", then we will deadlock; we call synchronize_irq(n)
which will wait for us to exit.
- if we call this function to free IRQ "n" from an interrupt handler
running on IRQ "b", and a handler for IRQ "n" is already running and
IRQ "n" interrupted IRQ "n", then we will deadlock.
In light of the above, I'd suggest changing the last line to:
* This function must not be called from interrupt context.
This patch is against 2.5.34:
--- orig/arch/i386/kernel/irq.c Fri Aug 30 14:52:51 2002
+++ linux/arch/i386/kernel/irq.c Sun Sep 29 14:13:39 2002
@@ -483,10 +483,7 @@
* does not return until any executing interrupts for this IRQ
* have completed.
*
- * This function may be called from interrupt context.
- *
- * Bugs: Attempting to free an irq in a handler for the same irq hangs
- * the machine.
+ * This function must not be called from interrupt context.
*/
void free_irq(unsigned int irq, void *dev_id)
--
Russell King (rmk@arm.linux.org.uk) The developer of ARM Linux
http://www.arm.linux.org.uk/personal/aboutme.html
reply other threads:[~2002-09-29 13:10 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20020929141550.A15924@flint.arm.linux.org.uk \
--to=rmk@arm.linux.org.uk \
--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
all inboxes | Powered by JetHome®