From: Josh Poimboeuf Date: Wed, 29 Apr 2020 15:24:50 +0000 (-0500) Subject: livepatch: Remove module_disable_ro() usage X-Git-Tag: v5.10.7~2453^2~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d556e1be33320366272ec02f93f98d7f308479f1;p=platform%2Fkernel%2Flinux-rpi.git livepatch: Remove module_disable_ro() usage 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 Acked-by: Peter Zijlstra (Intel) Acked-by: Joe Lawrence Acked-by: Miroslav Benes Signed-off-by: Jiri Kosina --- diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c index f9ebb54affab..6b8b3c067be0 100644 --- a/kernel/livepatch/core.c +++ b/kernel/livepatch/core.c @@ -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 @@ -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)