projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
82ad93f
)
[MIPS] N32: Make sure pointer is good before passing it to sys_waitid().
author
Ralf Baechle
<ralf@linux-mips.org>
Sun, 19 Feb 2006 03:42:11 +0000
(
03:42
+0000)
committer
Ralf Baechle
<ralf@linux-mips.org>
Tue, 21 Feb 2006 16:58:23 +0000
(16:58 +0000)
After all we're calling sys_waitid() with fs set to KERNEL_DS ...
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/kernel/linux32.c
patch
|
blob
|
history
diff --git
a/arch/mips/kernel/linux32.c
b/arch/mips/kernel/linux32.c
index 9996b6e84585415f504de9ebab7bbcbfa742cc66..5f68b220c26d6c806dc1ccc6ad323c0c69d30d79 100644
(file)
--- a/
arch/mips/kernel/linux32.c
+++ b/
arch/mips/kernel/linux32.c
@@
-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);