Re: [Lse-tech] Re: [PATCH 0/7]: Fix for unsafe notifier chain

Keith Owens
2005-11-27T15:59:18Z

On Sun, 27 Nov 2005 14:47:36 +0100,
Andi Kleen <ak@suse.de> wrote:
>akpm wrote
>> - Introduce a new notifier API which is wholly unlocked
>
>The old notifiers were already wholly unlocked. So it wouldn't
>even need any changes. Just additional locks everywhere.

Wrong. The existing implementation is racy as hell. There is NO
locking on the existing chains, these patches make the notifier chains
race free.

Some of the notifier callbacks are used in weird contexts, including
NMI, so the only option for those chains is RCU. Obviously those
callbacks cannot sleep. Other chains are used in more normal context
_AND_ the callbacks want to sleep, so those chains need to use sleeping
locks.