[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200710222334.45667.arnd@arndb.de>
Date: Mon, 22 Oct 2007 23:34:45 +0200
From: Arnd Bergmann <arnd@...db.de>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>, matthew@....cx,
ralf@...ux-mips.org, adobriyan@...il.com, viro@....linux.org.uk,
viro@...iv.linux.org.uk, linux-kernel@...r.kernel.org,
linux-arch@...r.kernel.org
Subject: Re: [PATCH 1/2] irq_flags_t: intro and core annotations
On Monday 22 October 2007, Andrew Morton wrote:
> It's almost always a bug to do spin_lock_irq() when local interrupts are
> disabled. However iirc when we've tried to add runtime debugging to catch
> that, it triggered false-positives which made the idea unworkable. I forget
> where.
I tried this as well a few years ago, and I think I hit a few places in
the early initialization, but nothing unfixable.
> However what we could do is to add a new
> spin_lock_irq_tell_me_if_i_goofed() which would perform that runtime check.
How about the opposite? We could have a raw_spin_lock_irq() in places where
there are valid uses of spin_lock_irq() with irqs disabled and the same
for spin_unlock_irq with interrupts already enabled.
I can try to come up with a new implementation, including some rate-limiting,
which I think my first attempt was missing.
Arnd <><
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists