Skip to content

Commit 56965ac

Browse files
Christoph HellwigAl Viro
authored andcommitted
net/sysctl: use cpumask_parse in flow_limit_cpu_sysctl
cpumask_parse_user works on __user pointers, so this is wrong now. Fixes: 3292739 ("sysctl: pass kernel pointers to ->proc_handler") Reported-by: build test robot <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Al Viro <[email protected]>
1 parent 3292739 commit 56965ac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/core/sysctl_net_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ static int flow_limit_cpu_sysctl(struct ctl_table *table, int write,
126126
return -ENOMEM;
127127

128128
if (write) {
129-
ret = cpumask_parse_user(buffer, *lenp, mask);
129+
ret = cpumask_parse(buffer, mask);
130130
if (ret)
131131
goto done;
132132

0 commit comments

Comments
 (0)