net/sysctl: use cpumask_parse in flow_limit_cpu_sysctl

cpumask_parse_user works on __user pointers, so this is wrong now.

Fixes: 32927393dc1c ("sysctl: pass kernel pointers to ->proc_handler")
Reported-by: build test robot <lkp@intel.com>
Change-Id: I28272ac9cff26605031fd506da9a88bfbbac05d0
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Tashfin Shakeer Rhythm <tashfinshakeerrhythm@gmail.com>
This commit is contained in:
Christoph Hellwig 2020-06-03 07:52:34 +02:00 • committed by basamaryan
commit 005cc8d39f
No known key found for this signature in database
GPG key ID: 210D5384FB2A5885

View file

@ -126,7 +126,7 @@ static int flow_limit_cpu_sysctl(struct ctl_table *table, int write,
return -ENOMEM;
if (write) {
ret = cpumask_parse_user(buffer, *lenp, mask);
ret = cpumask_parse(buffer, mask);
if (ret)
goto done;