diff options
author | Ben Dooks <ben.dooks@sifive.com> | 2022-07-14 09:47:44 +0200 |
---|---|---|
committer | akpm <akpm@linux-foundation.org> | 2022-07-30 03:12:35 +0200 |
commit | 591c32bddbe20ba0e172d9def3c7f22b9c926ad9 (patch) | |
tree | 8b3623d65b5889dcd07bc5001423dac603d2b9af /kernel/hung_task.c | |
parent | lib/lzo/lzo1x_compress.c: replace ternary operator with min() and min_t() (diff) | |
download | linux-591c32bddbe20ba0e172d9def3c7f22b9c926ad9.tar.xz linux-591c32bddbe20ba0e172d9def3c7f22b9c926ad9.zip |
kernel/hung_task: fix address space of proc_dohung_task_timeout_secs
The proc_dohung_task_timeout_secs() function is incorrectly marked
as having a __user buffer as argument 3. However this is not the
case and it is casing multiple sparse warnings. Fix the following
warnings by removing __user from the argument:
kernel/hung_task.c:237:52: warning: incorrect type in argument 3 (different address spaces)
kernel/hung_task.c:237:52: expected void *
kernel/hung_task.c:237:52: got void [noderef] __user *buffer
kernel/hung_task.c:287:35: warning: incorrect type in initializer (incompatible argument 3 (different address spaces))
kernel/hung_task.c:287:35: expected int ( [usertype] *proc_handler )( ... )
kernel/hung_task.c:287:35: got int ( * )( ... )
kernel/hung_task.c:295:35: warning: incorrect type in initializer (incompatible argument 3 (different address spaces))
kernel/hung_task.c:295:35: expected int ( [usertype] *proc_handler )( ... )
kernel/hung_task.c:295:35: got int ( * )( ... )
Link: https://lkml.kernel.org/r/20220714074744.189017-1-ben.dooks@sifive.com
Signed-off-by: Ben Dooks <ben.dooks@sifive.com>
Cc: <Conor.Dooley@microchip.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'kernel/hung_task.c')
-rw-r--r-- | kernel/hung_task.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/hung_task.c b/kernel/hung_task.c index cff3ae8c818f..bb2354f73ded 100644 --- a/kernel/hung_task.c +++ b/kernel/hung_task.c @@ -229,7 +229,7 @@ static long hung_timeout_jiffies(unsigned long last_checked, * Process updating of timeout sysctl */ static int proc_dohung_task_timeout_secs(struct ctl_table *table, int write, - void __user *buffer, + void *buffer, size_t *lenp, loff_t *ppos) { int ret; |