This patchset implements ideas that were mentioned and postponed during the review of the atomic replace patchset. I hope that I did not miss anything. Well, I did not add __used attribute to avoid non-static warnings in modules for the selftest. The work on the sample modules somehow stalled. BTW: Does it make sense to maintain the sample modules any longer? We could point people to the modules used by the selftest instead. The patches apply on top of livepatching.git, branch origin/for-5.1/atomic-replace. Petr Mladek (4): livepatch: Introduce klp_for_each_patch macro livepatch: Handle failing allocation of shadow variables in the selftest livepatch: Module coming and going callbacks can proceed all listed patches livepatch: Remove the redundant enabled flag in struct klp_patch include/linux/livepatch.h | 2 -- kernel/livepatch/core.c | 57 ++++++++++++++++-------------------- kernel/livepatch/core.h | 6 ++++ kernel/livepatch/transition.c | 9 +++--- kernel/livepatch/transition.h | 1 + lib/livepatch/test_klp_shadow_vars.c | 8 ++--- 6 files changed, 40 insertions(+), 43 deletions(-) -- 2.13.7