Re: [PATCH] Documentation/preempt-locking.txt clarification

From: Andrew Morton
Date: Wed Nov 10 2004 - 04:52:13 EST

Thomas Hood <jdthood@xxxxxxxxxxx> wrote:
> On Wed, 2004-11-10 at 09:57, Andrew Morton wrote:
> > I guess it's saying ...
> Thanks for the explanation. I include a new patch which incorporates
> your example. I am in no position to judge the _truth_ of the
> statements in this document; I am only hoping to _understand_ them. :)

I think the statement is in fact false. Ingo, what's your take on this
paragraph, from preempt-locking.txt?

An additional concern is proper usage of local_irq_disable and
local_irq_save. These may be used to protect from preemption, however,
on exit, if preemption may be enabled, a test to see if preemption is
required should be done. If these are called from the spin_lock and
read/write lock macros, the right thing is done. They may also be called
within a spin-lock protected region, however, if they are ever called
outside of this context, a test for preemption should be made. Do note
that calls from interrupt context or bottom half/ tasklets are also
protected by preemption locks and so may use the versions which do not
check preemption.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at