diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/compat.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/fs/compat.c b/fs/compat.c index 7b21b0a82596..1de2331db844 100644 --- a/fs/compat.c +++ b/fs/compat.c | |||
@@ -2230,21 +2230,16 @@ asmlinkage long compat_sys_signalfd(int ufd, | |||
2230 | asmlinkage long compat_sys_timerfd(int ufd, int clockid, int flags, | 2230 | asmlinkage long compat_sys_timerfd(int ufd, int clockid, int flags, |
2231 | const struct compat_itimerspec __user *utmr) | 2231 | const struct compat_itimerspec __user *utmr) |
2232 | { | 2232 | { |
2233 | long res; | ||
2234 | struct itimerspec t; | 2233 | struct itimerspec t; |
2235 | struct itimerspec __user *ut; | 2234 | struct itimerspec __user *ut; |
2236 | 2235 | ||
2237 | res = -EFAULT; | ||
2238 | if (get_compat_itimerspec(&t, utmr)) | 2236 | if (get_compat_itimerspec(&t, utmr)) |
2239 | goto err_exit; | 2237 | return -EFAULT; |
2240 | ut = compat_alloc_user_space(sizeof(*ut)); | 2238 | ut = compat_alloc_user_space(sizeof(*ut)); |
2241 | if (copy_to_user(ut, &t, sizeof(t)) ) | 2239 | if (copy_to_user(ut, &t, sizeof(t))) |
2242 | goto err_exit; | 2240 | return -EFAULT; |
2243 | 2241 | ||
2244 | res = sys_timerfd(ufd, clockid, flags, ut); | 2242 | return sys_timerfd(ufd, clockid, flags, ut); |
2245 | err_exit: | ||
2246 | return res; | ||
2247 | } | 2243 | } |
2248 | 2244 | ||
2249 | #endif /* CONFIG_TIMERFD */ | 2245 | #endif /* CONFIG_TIMERFD */ |
2250 | |||