From 82cc45b0e2f5d083f2c0c057d0c65530c116f1ab Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Wed, 25 Feb 2004 16:18:59 -0800 Subject: [PATCH] [PATCH] s390: compat_timer_settime. From: Martin Schwidefsky 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. --- kernel/compat.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kernel/compat.c b/kernel/compat.c index fb89b3233b044..f69dcd644a222 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(); -- 2.53.0