kpatch/kmod
Joe Lawrence fdf36400fb kmod/core: account for failing modules in notifier
The module notifier currently only handles newly loaded modules in the
MODULE_STATE_COMING state.  If target modules need to be unloaded, the
any kpatch module that patches it must first be disabled, releasing
module references held against the target module.  When the kpatch
modules are disabled, the target module is unpatched and the kpatch
core's data structures updated accordingly.

If a loading module happens to fail its init routine (missing hardware
for example), that module will not complete loading.  The kpatch core
doesn't properly account for this "phantom" target module, so when the
kpatch patch module is removed, it spews out an ugly warning when
attempting to remove a non-existing ftrace filter on the target module.

Register an additional module notifier (first in the list) to handle the
MODULE_STATE_GOING case.  This handler needs to do the inverse of the
MODULE_STATE_COMING handler.

Fixes #699.

Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
2018-04-10 11:46:36 -04:00
..
core kmod/core: account for failing modules in notifier 2018-04-10 11:46:36 -04:00
patch Merge pull request #780 from joe-lawrence/livepatch-hooks 2018-04-02 14:49:07 -04:00
Makefile kmod: Fix install path 2016-05-06 10:47:43 +01:00