Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 55928
b: refs/heads/master
c: 6d18c92
h: refs/heads/master
v: v3
  • Loading branch information
Davide Libenzi authored and Linus Torvalds committed May 11, 2007
1 parent 873ecf7 commit ad20ca0
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2121e24bd8dd16b4e3f8d995428e2a748d5180cc
refs/heads/master: 6d18c9220965b437287c3a7e803725c24992ceac
26 changes: 26 additions & 0 deletions trunk/fs/compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
#include <linux/tsacct_kern.h>
#include <linux/security.h>
#include <linux/highmem.h>
#include <linux/signal.h>
#include <linux/poll.h>
#include <linux/mm.h>
#include <linux/eventpoll.h>
Expand Down Expand Up @@ -2199,3 +2200,28 @@ asmlinkage long compat_sys_epoll_pwait(int epfd,
#endif /* TIF_RESTORE_SIGMASK */

#endif /* CONFIG_EPOLL */

#ifdef CONFIG_SIGNALFD

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));
}

#endif /* CONFIG_SIGNALFD */

0 comments on commit ad20ca0

Please sign in to comment.