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 <jpoimboe@redhat.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Joe Lawrence <joe.lawrence@redhat.com>
Acked-by: Miroslav Benes <mbenes@suse.cz>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
This commit is contained in:
Josh Poimboeuf 2020-04-29 10:24:50 -05:00 коммит произвёл Jiri Kosina
Родитель 88fc078a7a
Коммит d556e1be33
1 изменённых файлов: 0 добавлений и 2 удалений

Просмотреть файл

@ -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)