Skip to content

Commit aa82dc3

Browse files
jpoimboeJiri Kosina
authored andcommitted
livepatch: remove unnecessary object loaded check
klp_patch_object()'s callers already ensure that the object is loaded, so its call to klp_is_object_loaded() is unnecessary. This will also make it possible to move the patching code into a separate file. Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> Acked-by: Miroslav Benes <mbenes@suse.cz> Reviewed-by: Petr Mladek <pmladek@suse.com> Reviewed-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
1 parent 0dade9f commit aa82dc3

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

‎kernel/livepatch/core.c‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -467,9 +467,6 @@ static int klp_patch_object(struct klp_object *obj)
467467
if (WARN_ON(obj->patched))
468468
return -EINVAL;
469469

470-
if (WARN_ON(!klp_is_object_loaded(obj)))
471-
return -EINVAL;
472-
473470
klp_for_each_func(obj, func) {
474471
ret = klp_patch_func(func);
475472
if (ret) {

0 commit comments

Comments
 (0)