Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 105412
b: refs/heads/master
c: c019bbc
h: refs/heads/master
v: v3
  • Loading branch information
Ulrich Drepper authored and Linus Torvalds committed Jul 24, 2008
1 parent 6712df8 commit 57149a5
Show file tree
Hide file tree
Showing 3 changed files with 21 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: aaca0bdca573f3f51ea03139f9c7289541e7bca3
refs/heads/master: c019bbc612f6633ede7ed67725cbf68de45ae8a4
3 changes: 3 additions & 0 deletions trunk/include/linux/net.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ enum sock_type {

/* Flags for socket, socketpair, paccept */
#define SOCK_CLOEXEC O_CLOEXEC
#ifndef SOCK_NONBLOCK
#define SOCK_NONBLOCK O_NONBLOCK
#endif

#endif /* ARCH_HAS_SOCKET_TYPES */

Expand Down
17 changes: 17 additions & 0 deletions trunk/net/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <linux/mutex.h>
#include <linux/thread_info.h>
#include <linux/wanrouter.h>
#include <linux/if_bridge.h>
#include <linux/if_frad.h>
Expand Down Expand Up @@ -1504,6 +1505,7 @@ long do_accept(int fd, struct sockaddr __user *upeer_sockaddr,
goto out_put;
}

#ifdef HAVE_SET_RESTORE_SIGMASK
asmlinkage long sys_paccept(int fd, struct sockaddr __user *upeer_sockaddr,
int __user *upeer_addrlen,
const sigset_t __user *sigmask,
Expand Down Expand Up @@ -1541,6 +1543,21 @@ asmlinkage long sys_paccept(int fd, struct sockaddr __user *upeer_sockaddr,

return ret;
}
#else
asmlinkage long sys_paccept(int fd, struct sockaddr __user *upeer_sockaddr,
int __user *upeer_addrlen,
const sigset_t __user *sigmask,
size_t sigsetsize, int flags)
{
/* The platform does not support restoring the signal mask in the
* return path. So we do not allow using paccept() with a signal
* mask. */
if (sigmask)
return -EINVAL;

return do_accept(fd, upeer_sockaddr, upeer_addrlen, flags);
}
#endif

asmlinkage long sys_accept(int fd, struct sockaddr __user *upeer_sockaddr,
int __user *upeer_addrlen)
Expand Down

0 comments on commit 57149a5

Please sign in to comment.