aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/compat.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/fs/compat.c b/fs/compat.c
index 9cf75df9b2bb..2487b83b18df 100644
--- a/fs/compat.c
+++ b/fs/compat.c
@@ -46,6 +46,7 @@
46#include <linux/tsacct_kern.h> 46#include <linux/tsacct_kern.h>
47#include <linux/security.h> 47#include <linux/security.h>
48#include <linux/highmem.h> 48#include <linux/highmem.h>
49#include <linux/signal.h>
49#include <linux/poll.h> 50#include <linux/poll.h>
50#include <linux/mm.h> 51#include <linux/mm.h>
51#include <linux/eventpoll.h> 52#include <linux/eventpoll.h>
@@ -2199,3 +2200,28 @@ asmlinkage long compat_sys_epoll_pwait(int epfd,
2199#endif /* TIF_RESTORE_SIGMASK */ 2200#endif /* TIF_RESTORE_SIGMASK */
2200 2201
2201#endif /* CONFIG_EPOLL */ 2202#endif /* CONFIG_EPOLL */
2203
2204#ifdef CONFIG_SIGNALFD
2205
2206asmlinkage long compat_sys_signalfd(int ufd,
2207 const compat_sigset_t __user *sigmask,
2208 compat_size_t sigsetsize)
2209{
2210 compat_sigset_t ss32;
2211 sigset_t tmp;
2212 sigset_t __user *ksigmask;
2213
2214 if (sigsetsize != sizeof(compat_sigset_t))
2215 return -EINVAL;
2216 if (copy_from_user(&ss32, sigmask, sizeof(ss32)))
2217 return -EFAULT;
2218 sigset_from_compat(&tmp, &ss32);
2219 ksigmask = compat_alloc_user_space(sizeof(sigset_t));
2220 if (copy_to_user(ksigmask, &tmp, sizeof(sigset_t)))
2221 return -EFAULT;
2222
2223 return sys_signalfd(ufd, ksigmask, sizeof(sigset_t));
2224}
2225
2226#endif /* CONFIG_SIGNALFD */
2227