This patchset implements ideas that were mentioned and postponed during the review of the atomic replace patchset. The patches apply on top of livepatching.git, branch origin/for-5.1/atomic-replace. Changes against v1: + Added Joe's patch that fixed ptr_id() error code [Joe] + Did proper error handling in the shadow variable sefttest [All] + Removed the controversial patch that was removing patch->enabled flag [All]. + Fixed few typo's [Joe] + Added available Acks. Joe Lawrence (1): livepatch: return -ENOMEM on ptr_id() allocation failure Petr Mladek (3): livepatch: Introduce klp_for_each_patch macro livepatch: Proper error handling in the shadow variables selftest livepatch: Module coming and going callbacks can proceed with all listed patches kernel/livepatch/core.c | 34 ++++++++++------------------------ kernel/livepatch/core.h | 6 ++++++ kernel/livepatch/transition.c | 2 +- lib/livepatch/test_klp_shadow_vars.c | 24 +++++++++++++++++++++++- 4 files changed, 40 insertions(+), 26 deletions(-) -- 2.13.7