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

[MIPS] N32: Make sure pointer is good before passing it to sys_waitid().

After all we're calling sys_waitid() with fs set to KERNEL_DS ...

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

+3
+3
arch/mips/kernel/linux32.c
··· 230 230 long ret; 231 231 mm_segment_t old_fs = get_fs(); 232 232 233 + if (!access_ok(VERIFY_WRITE, uinfo, sizeof(*uinfo))) 234 + return -EFAULT; 235 + 233 236 set_fs (KERNEL_DS); 234 237 ret = sys_waitid(which, pid, uinfo, options, 235 238 uru ? (struct rusage __user *) &ru : NULL);