The new signalfd system call requires compat code for the sigset_t. This patch implements it in fs/compat.c
Signed-off-by: Davide Libenzi <[email protected]> - Davide fs/compat.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) Index: linux-2.6.20.ep2/fs/compat.c =================================================================== --- linux-2.6.20.ep2.orig/fs/compat.c 2007-03-06 17:22:33.000000000 -0800 +++ linux-2.6.20.ep2/fs/compat.c 2007-03-06 17:23:37.000000000 -0800 @@ -2235,3 +2235,23 @@ return sys_ni_syscall(); } #endif + +asmlinkage long compat_sys_signalfd(int ufd, const compat_sigset_t __user *sigmask, + compat_size_t sigsetsize) +{ + compat_sigset_t ss32; + sigset_t tmp; + sigset_t __user *ksigmask; + + if (sigsetsize != sizeof(compat_sigset_t)) + return -EINVAL; + if (copy_from_user(&ss32, sigmask, sizeof(ss32))) + return -EFAULT; + sigset_from_compat(&tmp, &ss32); + ksigmask = compat_alloc_user_space(sizeof(sigset_t)); + if (copy_to_user(ksigmask, &tmp, sizeof(sigset_t))) + return -EFAULT; + + return sys_signalfd(ufd, ksigmask, sizeof(sigset_t)); +} + - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

