Skip to content
Commit ef8daf8e authored by Joe Lawrence's avatar Joe Lawrence Committed by Jiri Kosina
Browse files

livepatch: unpatch all klp_objects if klp_module_coming fails



When an incoming module is considered for livepatching by
klp_module_coming(), it iterates over multiple patches and multiple
kernel objects in this order:

	list_for_each_entry(patch, &klp_patches, list) {
		klp_for_each_object(patch, obj) {

which means that if one of the kernel objects fails to patch,
klp_module_coming()'s error path needs to unpatch and cleanup any kernel
objects that were already patched by a previous patch.

Reported-by: default avatarMiroslav Benes <mbenes@suse.cz>
Suggested-by: default avatarPetr Mladek <pmladek@suse.com>
Signed-off-by: default avatarJoe Lawrence <joe.lawrence@redhat.com>
Acked-by: default avatarJosh Poimboeuf <jpoimboe@redhat.com>
Reviewed-by: default avatarPetr Mladek <pmladek@suse.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent dcba7108
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment