diff options
Diffstat (limited to 'mm/kfence')
-rw-r--r-- | mm/kfence/core.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/mm/kfence/core.c b/mm/kfence/core.c index 6e69986c3f0d..2b9f89749154 100644 --- a/mm/kfence/core.c +++ b/mm/kfence/core.c @@ -69,8 +69,11 @@ static int param_set_sample_interval(const char *val, const struct kernel_param if (ret < 0) return ret; - if (!num) /* Using 0 to indicate KFENCE is disabled. */ + /* Using 0 to indicate KFENCE is disabled. */ + if (!num && READ_ONCE(kfence_enabled)) { + pr_info("disabled\n"); WRITE_ONCE(kfence_enabled, false); + } *((unsigned long *)kp->arg) = num; @@ -898,6 +901,7 @@ static int kfence_enable_late(void) WRITE_ONCE(kfence_enabled, true); queue_delayed_work(system_unbound_wq, &kfence_timer, 0); + pr_info("re-enabled\n"); return 0; } |