From: Andrew Morton <akpm@zip.com.au>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Manfred Spraul <manfred@colorfullife.com>,
linux-kernel@vger.kernel.org,
Marcelo Tosatti <marcelo@conectiva.com.br>
Subject: Re: [patch] block/IDE/interrupt lockup
Date: Sat, 30 Mar 2002 11:06:25 -0800 [thread overview]
Message-ID: <3CA60CB1.E33080D5@zip.com.au> (raw)
In-Reply-To: <3CA603B0.8B73FD4C@zip.com.au> from "Andrew Morton" at Mar 30, 2002 10:28:00 AM <E16rNxa-0003UM-00@the-village.bc.nu>
Alan Cox wrote:
>
> > The kernel calls request_irq() inside cli() in lots of places.
> > That's the same bug: "if you called cli(), how come you're
> > allowing kmalloc to clear it?".
>
> Those places should if possible be fixed. I take patches. If we can get 2.4
> to BUG() on those kmalloc violations and clean them up it sounds like
> progress
What I'd like is a debugging function `can_sleep()'. This
is good for documentary purposes, and will catch bugs.
So kmalloc() would gain:
if (gfp_flags & __GFP_WAIT)
can_sleep();
can_sleep() would do the following:
- If CONFIG_PREEMPT, check the locking depth (minus BKL depth),
whine if non-zero.
- If inside cli(), whine.
- If inside __cli(), also whine (not really a bug, but a design error).
- whining will include generation of a backtrace.
I suspect a 2.4 version would generate too many bug reports :)
It would have to implement its own lock depth accounting if
we want the sleep-inside-spinlock checking.
There's some arch-dependent stuff in there. I'll do a 2.5
patch. I suspect it'll generate showers of stuff. We can
feed fixes back into 2.4.
-
next prev parent reply other threads:[~2002-03-30 19:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-30 9:35 [patch] block/IDE/interrupt lockup Manfred Spraul
2002-03-30 18:28 ` Andrew Morton
2002-03-30 18:52 ` Alan Cox
2002-03-30 19:06 ` Andrew Morton [this message]
2002-03-30 23:23 ` Keith Owens
-- strict thread matches above, loose matches on Subject: below --
2002-04-01 9:23 Manfred Spraul
2002-03-30 5:45 Andrew Morton
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=3CA60CB1.E33080D5@zip.com.au \
--to=akpm@zip.com.au \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=manfred@colorfullife.com \
--cc=marcelo@conectiva.com.br \
/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