Skip to content

Commit

Permalink
livepatch: Remove module_disable_ro() usage
Browse files Browse the repository at this point in the history
With arch_klp_init_object_loaded() gone, and apply_relocate_add() now
using text_poke(), livepatch no longer needs to use module_disable_ro().

Signed-off-by: Josh Poimboeuf <[email protected]>
Acked-by: Peter Zijlstra (Intel) <[email protected]>
Acked-by: Joe Lawrence <[email protected]>
Acked-by: Miroslav Benes <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
  • Loading branch information
jpoimboe authored and Jiri Kosina committed May 7, 2020
1 parent 88fc078 commit d556e1b
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions kernel/livepatch/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,6 @@ static int klp_init_object_loaded(struct klp_patch *patch,
if (klp_is_module(obj)) {

mutex_lock(&text_mutex);
module_disable_ro(patch->mod);

/*
* Only write module-specific relocations here
Expand All @@ -787,7 +786,6 @@ static int klp_init_object_loaded(struct klp_patch *patch,
*/
ret = klp_apply_object_relocs(patch, obj);

module_enable_ro(patch->mod, true);
mutex_unlock(&text_mutex);

if (ret)
Expand Down

0 comments on commit d556e1b

Please sign in to comment.