The patch titled
     signal/timer/event: timerfd compat code
has been added to the -mm tree.  Its filename is
     signal-timer-event-fds-v9-timerfd-compat-code.patch

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: signal/timer/event: timerfd compat code
From: Davide Libenzi <[email protected]>

This patch implements the necessary compat code for the timerfd system call.

Signed-off-by: Davide Libenzi <[email protected]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
---

 fs/compat.c            |   23 +++++++++++++++++++++++
 include/linux/compat.h |    5 +++++
 kernel/compat.c        |    8 ++++----
 3 files changed, 32 insertions(+), 4 deletions(-)

diff -puN fs/compat.c~signal-timer-event-fds-v9-timerfd-compat-code fs/compat.c
--- a/fs/compat.c~signal-timer-event-fds-v9-timerfd-compat-code
+++ a/fs/compat.c
@@ -2375,3 +2375,26 @@ asmlinkage long compat_sys_signalfd(int 
 
 #endif /* CONFIG_SIGNALFD */
 
+#ifdef CONFIG_TIMERFD
+
+asmlinkage long compat_sys_timerfd(int ufd, int clockid, int flags,
+                                  const struct compat_itimerspec __user *utmr)
+{
+       long res;
+       struct itimerspec t;
+       struct itimerspec __user *ut;
+
+       res = -EFAULT;
+       if (get_compat_itimerspec(&t, utmr))
+               goto err_exit;
+       ut = compat_alloc_user_space(sizeof(*ut));
+       if (copy_to_user(ut, &t, sizeof(t)) )
+               goto err_exit;
+
+       res = sys_timerfd(ufd, clockid, flags, ut);
+err_exit:
+       return res;
+}
+
+#endif /* CONFIG_TIMERFD */
+
diff -puN include/linux/compat.h~signal-timer-event-fds-v9-timerfd-compat-code 
include/linux/compat.h
--- a/include/linux/compat.h~signal-timer-event-fds-v9-timerfd-compat-code
+++ a/include/linux/compat.h
@@ -225,6 +225,11 @@ static inline int compat_timespec_compar
        return lhs->tv_nsec - rhs->tv_nsec;
 }
 
+extern int get_compat_itimerspec(struct itimerspec *dst,
+                                const struct compat_itimerspec __user *src);
+extern int put_compat_itimerspec(struct compat_itimerspec __user *dst,
+                                const struct itimerspec *src);
+
 asmlinkage long compat_sys_adjtimex(struct compat_timex __user *utp);
 
 extern int compat_printk(const char *fmt, ...);
diff -puN kernel/compat.c~signal-timer-event-fds-v9-timerfd-compat-code 
kernel/compat.c
--- a/kernel/compat.c~signal-timer-event-fds-v9-timerfd-compat-code
+++ a/kernel/compat.c
@@ -475,8 +475,8 @@ asmlinkage long compat_sys_sched_getaffi
        return min_length;
 }
 
-static int get_compat_itimerspec(struct itimerspec *dst, 
-                                struct compat_itimerspec __user *src)
+int get_compat_itimerspec(struct itimerspec *dst,
+                         const struct compat_itimerspec __user *src)
 { 
        if (get_compat_timespec(&dst->it_interval, &src->it_interval) ||
            get_compat_timespec(&dst->it_value, &src->it_value))
@@ -484,8 +484,8 @@ static int get_compat_itimerspec(struct 
        return 0;
 } 
 
-static int put_compat_itimerspec(struct compat_itimerspec __user *dst, 
-                                struct itimerspec *src)
+int put_compat_itimerspec(struct compat_itimerspec __user *dst,
+                         const struct itimerspec *src)
 { 
        if (put_compat_timespec(&src->it_interval, &dst->it_interval) ||
            put_compat_timespec(&src->it_value, &dst->it_value))
_

Patches currently in -mm which might be from [email protected] are

origin.patch
epoll-optimizations-and-cleanups.patch
epoll-optimizations-and-cleanups-tidy.patch
signal-timer-event-fds-v9-anonymous-inode-source.patch
signal-timer-event-fds-v9-signalfd-core.patch
signal-timer-event-fds-v9-signalfd-wire-up-i386-arch.patch
signal-timer-event-fds-v9-signalfd-wire-up-x86_64-arch.patch
signal-timer-event-fds-v9-signalfd-compat-code.patch
signal-timer-event-fds-v9-timerfd-core.patch
signal-timer-event-fds-v9-timerfd-wire-up-i386-arch.patch
signal-timer-event-fds-v9-timerfd-wire-up-x86_64-arch.patch
signal-timer-event-fds-v9-timerfd-compat-code.patch
signal-timer-event-fds-v9-eventfd-core.patch
signal-timer-event-fds-v9-eventfd-wire-up-i386-arch.patch
signal-timer-event-fds-v9-eventfd-wire-up-x86_64-arch.patch
signal-timer-event-fds-v9-kaio-eventfd-support-example.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to