diff options
Diffstat (limited to 'kernel/livepatch/core.c')
-rw-r--r-- | kernel/livepatch/core.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c index 1c3c9b27c916..41be6061b92f 100644 --- a/kernel/livepatch/core.c +++ b/kernel/livepatch/core.c | |||
@@ -366,11 +366,6 @@ static int __klp_enable_patch(struct klp_patch *patch) | |||
366 | /* | 366 | /* |
367 | * A reference is taken on the patch module to prevent it from being | 367 | * A reference is taken on the patch module to prevent it from being |
368 | * unloaded. | 368 | * unloaded. |
369 | * | ||
370 | * Note: For immediate (no consistency model) patches we don't allow | ||
371 | * patch modules to unload since there is no safe/sane method to | ||
372 | * determine if a thread is still running in the patched code contained | ||
373 | * in the patch module once the ftrace registration is successful. | ||
374 | */ | 369 | */ |
375 | if (!try_module_get(patch->mod)) | 370 | if (!try_module_get(patch->mod)) |
376 | return -ENODEV; | 371 | return -ENODEV; |
@@ -890,12 +885,7 @@ int klp_register_patch(struct klp_patch *patch) | |||
890 | if (!klp_initialized()) | 885 | if (!klp_initialized()) |
891 | return -ENODEV; | 886 | return -ENODEV; |
892 | 887 | ||
893 | /* | 888 | if (!klp_have_reliable_stack()) { |
894 | * Architectures without reliable stack traces have to set | ||
895 | * patch->immediate because there's currently no way to patch kthreads | ||
896 | * with the consistency model. | ||
897 | */ | ||
898 | if (!klp_have_reliable_stack() && !patch->immediate) { | ||
899 | pr_err("This architecture doesn't have support for the livepatch consistency model.\n"); | 889 | pr_err("This architecture doesn't have support for the livepatch consistency model.\n"); |
900 | return -ENOSYS; | 890 | return -ENOSYS; |
901 | } | 891 | } |