From: Duncan Sands <baldrick@wanadoo.fr>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] spin_lock_irq debugging
Date: Wed, 21 May 2003 22:08:09 +0200 [thread overview]
Message-ID: <200305212208.09376.baldrick@wanadoo.fr> (raw)
Of course the real problem is the corresponding spin_unlock_irq
enabling local irqs when they should have been left disabled, but
this is easier to check for. Your logs will fill up.
diff -Nru a/include/linux/spinlock.h b/include/linux/spinlock.h
--- a/include/linux/spinlock.h Wed May 21 22:04:29 2003
+++ b/include/linux/spinlock.h Wed May 21 22:04:29 2003
@@ -261,6 +261,10 @@
#define spin_lock_irq(lock) \
do { \
+ if (unlikely(irqs_disabled())) { \
+ printk(KERN_ERR "bad: spin_lock_irq with irqs disabled!\n"); \
+ dump_stack(); \
+ } \
local_irq_disable(); \
preempt_disable(); \
_raw_spin_lock(lock); \
reply other threads:[~2003-05-21 19:55 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=200305212208.09376.baldrick@wanadoo.fr \
--to=baldrick@wanadoo.fr \
--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
all inboxes | Powered by JetHome®