Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
fork

Configure Feed

Select the types of activity you want to include in your feed.

m68knommu: fix sparse warnings in signal code

Commit 858b810bf63f ("m68knommu: switch to using asm-generic/uaccess.h")
cleaned up a number of sparse warnings associated with lack of __user
annotations. It also uncovered a couple of more in the signal handling
code:

arch/m68k/kernel/signal.c:923:16: expected char [noderef] __user *__x
arch/m68k/kernel/signal.c:923:16: got void *
arch/m68k/kernel/signal.c:1007:16: warning: incorrect type in initializer (different address spaces)
arch/m68k/kernel/signal.c:1007:16: expected char [noderef] __user *__x
arch/m68k/kernel/signal.c:1007:16: got void *
arch/m68k/kernel/signal.c:1132:6: warning: symbol 'do_notify_resume' was not declared. Should it be static?

These are specific to a non-MMU configuration. Fix these inserting the
correct __user annotations as required.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Greg Ungerer <gerg@linux-m68k.org>

+4 -2
+4 -2
arch/m68k/kernel/signal.c
··· 920 920 err |= __put_user(0x70004e40 + (__NR_sigreturn << 16), 921 921 (long __user *)(frame->retcode)); 922 922 #else 923 - err |= __put_user((void *) ret_from_user_signal, &frame->pretcode); 923 + err |= __put_user((long) ret_from_user_signal, 924 + (long __user *) &frame->pretcode); 924 925 #endif 925 926 926 927 if (err) ··· 1005 1004 err |= __put_user(0x4e40, (short __user *)(frame->retcode + 4)); 1006 1005 #endif 1007 1006 #else 1008 - err |= __put_user((void *) ret_from_user_rt_signal, &frame->pretcode); 1007 + err |= __put_user((long) ret_from_user_rt_signal, 1008 + (long __user *) &frame->pretcode); 1009 1009 #endif /* CONFIG_MMU */ 1010 1010 1011 1011 if (err)