Skip to content

Commit 3b70ae4

Browse files
bulwahntorvalds
authored andcommitted
kernel/hung_task.c: make type annotations consistent
Commit 3292739 ("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 <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: Tetsuo Handa <[email protected]> Cc: Al Viro <[email protected]> Cc: Andrey Ignatov <[email protected]> Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Linus Torvalds <[email protected]>
1 parent afabdf3 commit 3b70ae4

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

kernel/hung_task.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -225,8 +225,7 @@ static long hung_timeout_jiffies(unsigned long last_checked,
225225
* Process updating of timeout sysctl
226226
*/
227227
int proc_dohung_task_timeout_secs(struct ctl_table *table, int write,
228-
void __user *buffer,
229-
size_t *lenp, loff_t *ppos)
228+
void *buffer, size_t *lenp, loff_t *ppos)
230229
{
231230
int ret;
232231

0 commit comments

Comments
 (0)