From: Wen Yang Use numeric bounds for the write-mode table and static-key handler. Suggested-by: Joel Granados Signed-off-by: Wen Yang --- kernel/sysctl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 7d0bcd2b24ef..ab25c75cb3ac 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -1348,8 +1348,8 @@ int proc_do_static_key(const struct ctl_table *table, int dir, .data = &val, .maxlen = sizeof(val), .mode = table->mode, - .extra1 = SYSCTL_ZERO, - .extra2 = SYSCTL_ONE, + .min = 0, + .max = 1, }; if (SYSCTL_USER_TO_KERN(dir) && !capable(CAP_SYS_ADMIN)) @@ -1375,8 +1375,8 @@ static const struct ctl_table sysctl_subsys_table[] = { .maxlen = sizeof(int), .mode = 0644, .proc_handler = proc_dointvec_minmax, - .extra1 = SYSCTL_NEG_ONE, - .extra2 = SYSCTL_ONE, + .min = -1, + .max = 1, }, { .procname = "ngroups_max", -- 2.25.1