summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorLukas Bulwahn <lukas.bulwahn@gmail.com>2020-11-01 17:08:10 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2020-11-02 12:14:19 -0800
commit3b70ae4f5c4e050bdebeeefe0c369524f37917cf (patch)
treeb0310164ce72c0df39b6a0170c49c38b3ff59f67 /kernel
parentafabdf3338728c3aaa9f55d127e903dcd5f4acc7 (diff)
downloadlinux-stable-3b70ae4f5c4e050bdebeeefe0c369524f37917cf.tar.gz
linux-stable-3b70ae4f5c4e050bdebeeefe0c369524f37917cf.tar.bz2
linux-stable-3b70ae4f5c4e050bdebeeefe0c369524f37917cf.zip
kernel/hung_task.c: make type annotations consistent
Commit 32927393dc1c ("sysctl: pass kernel pointers to ->proc_handler") removed various __user annotations from function signatures as part of its refactoring. It also removed the __user annotation for proc_dohung_task_timeout_secs() at its declaration in sched/sysctl.h, but not at its definition in kernel/hung_task.c. Hence, sparse complains: kernel/hung_task.c:271:5: error: symbol 'proc_dohung_task_timeout_secs' redeclared with different type (incompatible argument 3 (different address spaces)) Adjust the annotation at the definition fitting to that refactoring to make sparse happy again, which also resolves this warning from sparse: kernel/hung_task.c:277:52: warning: incorrect type in argument 3 (different address spaces) kernel/hung_task.c:277:52: expected void * kernel/hung_task.c:277:52: got void [noderef] __user *buffer No functional change. No change in object code. Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Cc: Christoph Hellwig <hch@lst.de> Cc: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Andrey Ignatov <rdna@fb.com> Link: https://lkml.kernel.org/r/20201028130541.20320-1-lukas.bulwahn@gmail.com Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/hung_task.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/hung_task.c b/kernel/hung_task.c
index ce76f490126c..396ebaebea3f 100644
--- a/kernel/hung_task.c
+++ b/kernel/hung_task.c
@@ -225,8 +225,7 @@ static long hung_timeout_jiffies(unsigned long last_checked,
* Process updating of timeout sysctl
*/
int proc_dohung_task_timeout_secs(struct ctl_table *table, int write,
- void __user *buffer,
- size_t *lenp, loff_t *ppos)
+ void *buffer, size_t *lenp, loff_t *ppos)
{
int ret;