Re: [PATCH 2/3] module: Fix up module_notifier return values.
From: Peter Zijlstra
Date: Tue Jun 25 2019 - 03:43:02 EST
On Mon, Jun 24, 2019 at 04:58:10PM -0400, Frank Ch. Eigler wrote:
> Hi -
>
> > > While auditing all module notifiers I noticed a whole bunch of fail
> > > wrt the return value. Notifiers have a 'special' return semantics.
>
> From peterz's comments, the patches, it's not obvious to me how one is
> to choose between 0 (NOTIFY_DONE) and 1 (NOTIFY_OK) in the case of a
> routine success.
I'm not sure either; what I think I choice was:
- if I want to completely ignore the callback, use DONE (per the
"Don't care" comment).
- if we finished the notifier without error, use OK or
notifier_from_errno(0).
But yes, its a bit of a shit interface.