aboutsummaryrefslogtreecommitdiffstats
path: root/fs/compat.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/compat.c')
-rw-r--r--fs/compat.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/fs/compat.c b/fs/compat.c
index 2487b83b18df..7b21b0a82596 100644
--- a/fs/compat.c
+++ b/fs/compat.c
@@ -2225,3 +2225,26 @@ asmlinkage long compat_sys_signalfd(int ufd,
2225 2225
2226#endif /* CONFIG_SIGNALFD */ 2226#endif /* CONFIG_SIGNALFD */
2227 2227
2228#ifdef CONFIG_TIMERFD
2229
2230asmlinkage long compat_sys_timerfd(int ufd, int clockid, int flags,
2231 const struct compat_itimerspec __user *utmr)
2232{
2233 long res;
2234 struct itimerspec t;
2235 struct itimerspec __user *ut;
2236
2237 res = -EFAULT;
2238 if (get_compat_itimerspec(&t, utmr))
2239 goto err_exit;
2240 ut = compat_alloc_user_space(sizeof(*ut));
2241 if (copy_to_user(ut, &t, sizeof(t)) )
2242 goto err_exit;
2243
2244 res = sys_timerfd(ufd, clockid, flags, ut);
2245err_exit:
2246 return res;
2247}
2248
2249#endif /* CONFIG_TIMERFD */
2250