aboutsummaryrefslogtreecommitdiffstats
path: root/fs/compat.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-02-24 14:52:17 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2013-03-03 22:58:49 -0500
commit35280bd4a3fa841897e2638437607fdec6c34f31 (patch)
tree03c7cb65bcb2cc94c1613944798f780645e64edd /fs/compat.c
parent19f4fc3aee180000fe45952691bbe69dde1d9e95 (diff)
switch epoll_pwait to COMPAT_SYSCALL_DEFINE
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/compat.c')
-rw-r--r--fs/compat.c49
1 files changed, 0 insertions, 49 deletions
diff --git a/fs/compat.c b/fs/compat.c
index 2ae2a98891cd..45137a3832f3 100644
--- a/fs/compat.c
+++ b/fs/compat.c
@@ -44,7 +44,6 @@
44#include <linux/signal.h> 44#include <linux/signal.h>
45#include <linux/poll.h> 45#include <linux/poll.h>
46#include <linux/mm.h> 46#include <linux/mm.h>
47#include <linux/eventpoll.h>
48#include <linux/fs_struct.h> 47#include <linux/fs_struct.h>
49#include <linux/slab.h> 48#include <linux/slab.h>
50#include <linux/pagemap.h> 49#include <linux/pagemap.h>
@@ -1659,54 +1658,6 @@ asmlinkage long compat_sys_ppoll(struct pollfd __user *ufds,
1659 return ret; 1658 return ret;
1660} 1659}
1661 1660
1662#ifdef CONFIG_EPOLL
1663
1664asmlinkage long compat_sys_epoll_pwait(int epfd,
1665 struct compat_epoll_event __user *events,
1666 int maxevents, int timeout,
1667 const compat_sigset_t __user *sigmask,
1668 compat_size_t sigsetsize)
1669{
1670 long err;
1671 compat_sigset_t csigmask;
1672 sigset_t ksigmask, sigsaved;
1673
1674 /*
1675 * If the caller wants a certain signal mask to be set during the wait,
1676 * we apply it here.
1677 */
1678 if (sigmask) {
1679 if (sigsetsize != sizeof(compat_sigset_t))
1680 return -EINVAL;
1681 if (copy_from_user(&csigmask, sigmask, sizeof(csigmask)))
1682 return -EFAULT;
1683 sigset_from_compat(&ksigmask, &csigmask);
1684 sigdelsetmask(&ksigmask, sigmask(SIGKILL) | sigmask(SIGSTOP));
1685 sigprocmask(SIG_SETMASK, &ksigmask, &sigsaved);
1686 }
1687
1688 err = sys_epoll_wait(epfd, events, maxevents, timeout);
1689
1690 /*
1691 * If we changed the signal mask, we need to restore the original one.
1692 * In case we've got a signal while waiting, we do not restore the
1693 * signal mask yet, and we allow do_signal() to deliver the signal on
1694 * the way back to userspace, before the signal mask is restored.
1695 */
1696 if (sigmask) {
1697 if (err == -EINTR) {
1698 memcpy(&current->saved_sigmask, &sigsaved,
1699 sizeof(sigsaved));
1700 set_restore_sigmask();
1701 } else
1702 sigprocmask(SIG_SETMASK, &sigsaved, NULL);
1703 }
1704
1705 return err;
1706}
1707
1708#endif /* CONFIG_EPOLL */
1709
1710#ifdef CONFIG_FHANDLE 1661#ifdef CONFIG_FHANDLE
1711/* 1662/*
1712 * Exactly like fs/open.c:sys_open_by_handle_at(), except that it 1663 * Exactly like fs/open.c:sys_open_by_handle_at(), except that it