Message ID | 20210924224406.83XR7wX9V%akpm@linux-foundation.org (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [01/16] mm, hwpoison: add is_free_buddy_page() in HWPoisonHandlable() | expand |
--- a/mm/util.c~mm-fix-the-uninitialized-use-in-overcommit_policy_handler +++ a/mm/util.c @@ -787,7 +787,7 @@ int overcommit_policy_handler(struct ctl size_t *lenp, loff_t *ppos) { struct ctl_table t; - int new_policy; + int new_policy = -1; int ret; /* @@ -805,7 +805,7 @@ int overcommit_policy_handler(struct ctl t = *table; t.data = &new_policy; ret = proc_dointvec_minmax(&t, write, buffer, lenp, ppos); - if (ret) + if (ret || new_policy == -1) return ret; mm_compute_batch(new_policy);