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 <[email protected]> Acked-by: Miroslav Benes <[email protected]> Reviewed-by: Petr Mladek <[email protected]> Reviewed-by: Kamalesh Babulal <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent 0dade9f commit aa82dc3

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

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)