diff options
author | Josh Poimboeuf <jpoimboe@redhat.com> | 2020-04-29 18:24:52 +0300 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2020-05-08 01:12:43 +0300 |
commit | 5b384f933590a086ca9a0abdc2e55e41107ac440 (patch) | |
tree | c0e8eff59863dce168272dacd518d6ce26d93314 /kernel | |
parent | 0d9fbf78fefb421a3af97394ce80bba0db4f046a (diff) | |
download | linux-5b384f933590a086ca9a0abdc2e55e41107ac440.tar.xz |
x86/module: Use text_mutex in apply_relocate_add()
Now that the livepatch code no longer needs the text_mutex for changing
module permissions, move its usage down to apply_relocate_add().
Note the s390 version of apply_relocate_add() doesn't need to use the
text_mutex because it already uses s390_kernel_write_lock, which
accomplishes the same task.
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Acked-by: Joe Lawrence <joe.lawrence@redhat.com>
Acked-by: Miroslav Benes <mbenes@suse.cz>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/livepatch/core.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c index 6b8b3c067be0..96d2da14eb0d 100644 --- a/kernel/livepatch/core.c +++ b/kernel/livepatch/core.c @@ -775,9 +775,6 @@ static int klp_init_object_loaded(struct klp_patch *patch, int ret; if (klp_is_module(obj)) { - - mutex_lock(&text_mutex); - /* * Only write module-specific relocations here * (.klp.rela.{module}.*). vmlinux-specific relocations were @@ -785,9 +782,6 @@ static int klp_init_object_loaded(struct klp_patch *patch, * itself. */ ret = klp_apply_object_relocs(patch, obj); - - mutex_unlock(&text_mutex); - if (ret) return ret; } |