summaryrefslogtreecommitdiff
path: root/kernel/compat.c
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2004-02-25 16:18:59 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-02-25 16:18:59 -0800
commit82cc45b0e2f5d083f2c0c057d0c65530c116f1ab (patch)
tree5d2b106651fc19ef6bfe1709041170d73300475d /kernel/compat.c
parent4e3acbeae836c55ae7f3ef7fae9c53c359ee060e (diff)
[PATCH] s390: compat_timer_settime.
From: Martin Schwidefsky <schwidefsky@de.ibm.com> sys_timer_settime returns EINVAL if *new is NULL, compat_timer_settime returns EFAULT. Add a check to compat_timer_settime to return EINVAL if *new is NULL.
Diffstat (limited to 'kernel/compat.c')
-rw-r--r--kernel/compat.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/compat.c b/kernel/compat.c
index fb89b3233b04..f69dcd644a22 100644
--- a/kernel/compat.c
+++ b/kernel/compat.c
@@ -441,6 +441,9 @@ long compat_timer_settime(timer_t timer_id, int flags,
long err;
mm_segment_t oldfs;
struct itimerspec newts, oldts;
+
+ if (!new)
+ return -EINVAL;
if (get_compat_itimerspec(&newts, new))
return -EFAULT;
oldfs = get_fs();