Skip to content

Commit

Permalink
livepatch: remove unnecessary object loaded check
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
jpoimboe authored and Jiri Kosina committed Mar 8, 2017
1 parent 0dade9f commit aa82dc3
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions kernel/livepatch/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -467,9 +467,6 @@ static int klp_patch_object(struct klp_object *obj)
if (WARN_ON(obj->patched))
return -EINVAL;

if (WARN_ON(!klp_is_object_loaded(obj)))
return -EINVAL;

klp_for_each_func(obj, func) {
ret = klp_patch_func(func);
if (ret) {
Expand Down

0 comments on commit aa82dc3

Please sign in to comment.