Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f3468e0c authored by Ralf Baechle's avatar Ralf Baechle
Browse files

[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: default avatarRalf Baechle <ralf@linux-mips.org>
parent 82ad93f4
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -230,6 +230,9 @@ sysn32_waitid(int which, compat_pid_t pid,
	long ret;
	mm_segment_t old_fs = get_fs();

	if (!access_ok(VERIFY_WRITE, uinfo, sizeof(*uinfo)))
		return -EFAULT;

	set_fs (KERNEL_DS);
	ret = sys_waitid(which, pid, uinfo, options,
			 uru ? (struct rusage __user *) &ru : NULL);