Re: [RFC][PATCH] module: Propagate MODULE_STATE_COMING notifier errors

From: Peter Zijlstra
Date: Wed Jun 19 2019 - 07:31:11 EST


On Wed, Jun 19, 2019 at 01:12:12PM +0200, Miroslav Benes wrote:
> On Mon, 17 Jun 2019, Peter Zijlstra wrote:
>
> >
> > Some module notifiers; such as jump_label_module_notifier(),
> > tracepoint_module_notify(); can fail the MODULE_STATE_COMING callback
> > (due to -ENOMEM for example). However module.c:prepare_coming_module()
> > ignores all such errors, even though this function can already fail due
> > to klp_module_coming().
>
> It does, but there is no change from the pre-prepare_coming_module()
> times. Coming notifiers were called in complete_formation(), their return
> values happily ignored and going notifiers not called to clean up even
> before.

Sure; but I didn't care to look before :-) The fact that it can
currently fail means most/all the unwinding is already there and we only
need to consider the additional cases.