Re: [PATCH] Allow raw_notifier callouts to unregister themselves

From: Alan Stern
Date: Tue May 16 2006 - 11:40:44 EST


On Thu, 11 May 2006, David S. Miller wrote:

> From: Andrew Morton <akpm@xxxxxxxx>
> Date: Thu, 11 May 2006 11:25:09 -0700
>
> > Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote:
> > >
> > > Since raw_notifier chains don't benefit from any centralized locking
> > > protections, they shouldn't suffer from the associated limitations.
> > > Under some circumstances it might make sense for a raw_notifier callout
> > > routine to unregister itself from the notifier chain. This patch (as678)
> > > changes the notifier core to allow for such things.
> >
> > ok... Can you see any reason why 2.6.17 needs this?
>
> If this patch makes raw notifiers behave more closely to the
> way notifiers did before the notifier patch went into 2.6.17,
> we should seriouly consider it. We've had enough regressions
> from that patch, and anything which minimizes any possible other
> such regressions would be a plus.

Sorry I'm a little late replying to this...

Actually this patch makes raw notifiers behave a little _less_ like the
original pre-2.6.17 notifiers. With the original code, a notifier callout
routine could unregister itself and deallocate its notifier_block, thereby
causing an oops when it returned. With this patch, the oops will not
occur.

That's the only difference.

Alan Stern

-
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/