aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2006-02-18 22:42:11 -0500
committerRalf Baechle <ralf@linux-mips.org>2006-02-21 11:58:23 -0500
commitf3468e0c34c8de919062582575a01e2434c8e727 (patch)
treecb21a54f7b04e1408ea23016066c4c55aa3620cd
parent82ad93f4a002294820e9a5e6f84beef2222a54b7 (diff)
[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>
-rw-r--r--arch/mips/kernel/linux32.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/mips/kernel/linux32.c b/arch/mips/kernel/linux32.c
index 9996b6e84585..5f68b220c26d 100644
--- a/arch/mips/kernel/linux32.c
+++ b/arch/mips/kernel/linux32.c
@@ -230,6 +230,9 @@ sysn32_waitid(int which, compat_pid_t pid,
230 long ret; 230 long ret;
231 mm_segment_t old_fs = get_fs(); 231 mm_segment_t old_fs = get_fs();
232 232
233 if (!access_ok(VERIFY_WRITE, uinfo, sizeof(*uinfo)))
234 return -EFAULT;
235
233 set_fs (KERNEL_DS); 236 set_fs (KERNEL_DS);
234 ret = sys_waitid(which, pid, uinfo, options, 237 ret = sys_waitid(which, pid, uinfo, options,
235 uru ? (struct rusage __user *) &ru : NULL); 238 uru ? (struct rusage __user *) &ru : NULL);