Re: Notifier chains are unsafe

From: Keith Owens
Date: Thu Oct 27 2005 - 19:49:01 EST


On Thu, 27 Oct 2005 16:02:08 -0700,
Chandra Seetharaman <sekharan@xxxxxxxxxx> wrote:
>On Thu, 2005-10-27 at 17:21 -0400, Alan Stern wrote:
>> The other problem is that you violated Keith's statement that
>> notifier_call_chain shouldn't take any locks. On the other hand, if we
>
>I would interpret Keith's comment like this: callout should not be
>called with any locks held (because that would limit the callouts from
>blocking).

We should be able to call notifier_call_chain() from any context. That
includes oops, panic, NMI and other unmaskable machine check events.
If you can call notifier_call_chain() from an unmaskable context then
it follows that the callbacks cannot take any locks. Locks are not
safe in NMI context.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/