mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-12 16:58:53 +00:00
[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>
This commit is contained in:
parent
82ad93f4a0
commit
f3468e0c34
@ -230,6 +230,9 @@ sysn32_waitid(int which, compat_pid_t pid,
|
|||||||
long ret;
|
long ret;
|
||||||
mm_segment_t old_fs = get_fs();
|
mm_segment_t old_fs = get_fs();
|
||||||
|
|
||||||
|
if (!access_ok(VERIFY_WRITE, uinfo, sizeof(*uinfo)))
|
||||||
|
return -EFAULT;
|
||||||
|
|
||||||
set_fs (KERNEL_DS);
|
set_fs (KERNEL_DS);
|
||||||
ret = sys_waitid(which, pid, uinfo, options,
|
ret = sys_waitid(which, pid, uinfo, options,
|
||||||
uru ? (struct rusage __user *) &ru : NULL);
|
uru ? (struct rusage __user *) &ru : NULL);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user