Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 368807
b: refs/heads/master
c: 7d4c04f
h: refs/heads/master
i:
  368805: 6e2d540
  368803: c545b07
  368799: 61fc0b5
v: v3
  • Loading branch information
Keller, Jacob E authored and David S. Miller committed Mar 31, 2013
1 parent af908a8 commit 58552da
Show file tree
Hide file tree
Showing 24 changed files with 54 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4eb06148250f92e1e58bf069c309dac173e8b5f7
refs/heads/master: 7d4c04fc170087119727119074e72445f2bb192b
2 changes: 2 additions & 0 deletions trunk/arch/alpha/include/uapi/asm/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,6 @@

#define SO_LOCK_FILTER 44

#define SO_SELECT_ERR_QUEUE 45

#endif /* _UAPI_ASM_SOCKET_H */
2 changes: 2 additions & 0 deletions trunk/arch/avr32/include/uapi/asm/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,6 @@

#define SO_LOCK_FILTER 44

#define SO_SELECT_ERR_QUEUE 45

#endif /* __ASM_AVR32_SOCKET_H */
2 changes: 2 additions & 0 deletions trunk/arch/cris/include/uapi/asm/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@

#define SO_LOCK_FILTER 44

#define SO_SELECT_ERR_QUEUE 45

#endif /* _ASM_SOCKET_H */


2 changes: 2 additions & 0 deletions trunk/arch/frv/include/uapi/asm/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,7 @@

#define SO_LOCK_FILTER 44

#define SO_SELECT_ERR_QUEUE 45

#endif /* _ASM_SOCKET_H */

2 changes: 2 additions & 0 deletions trunk/arch/h8300/include/uapi/asm/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,6 @@

#define SO_LOCK_FILTER 44

#define SO_SELECT_ERR_QUEUE 45

#endif /* _ASM_SOCKET_H */
2 changes: 2 additions & 0 deletions trunk/arch/ia64/include/uapi/asm/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,6 @@

#define SO_LOCK_FILTER 44

#define SO_SELECT_ERR_QUEUE 45

#endif /* _ASM_IA64_SOCKET_H */
2 changes: 2 additions & 0 deletions trunk/arch/m32r/include/uapi/asm/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,6 @@

#define SO_LOCK_FILTER 44

#define SO_SELECT_ERR_QUEUE 45

#endif /* _ASM_M32R_SOCKET_H */
2 changes: 2 additions & 0 deletions trunk/arch/mips/include/uapi/asm/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,6 @@

#define SO_LOCK_FILTER 44

#define SO_SELECT_ERR_QUEUE 45

#endif /* _UAPI_ASM_SOCKET_H */
2 changes: 2 additions & 0 deletions trunk/arch/mn10300/include/uapi/asm/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,6 @@

#define SO_LOCK_FILTER 44

#define SO_SELECT_ERR_QUEUE 45

#endif /* _ASM_SOCKET_H */
2 changes: 2 additions & 0 deletions trunk/arch/parisc/include/uapi/asm/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@

#define SO_LOCK_FILTER 0x4025

#define SO_SELECT_ERR_QUEUE 0x4026

/* O_NONBLOCK clashes with the bits used for socket types. Therefore we
* have to define SOCK_NONBLOCK to a different value here.
*/
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/powerpc/include/uapi/asm/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,6 @@

#define SO_LOCK_FILTER 44

#define SO_SELECT_ERR_QUEUE 45

#endif /* _ASM_POWERPC_SOCKET_H */
2 changes: 2 additions & 0 deletions trunk/arch/s390/include/uapi/asm/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,6 @@

#define SO_LOCK_FILTER 44

#define SO_SELECT_ERR_QUEUE 45

#endif /* _ASM_SOCKET_H */
2 changes: 2 additions & 0 deletions trunk/arch/sparc/include/uapi/asm/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@

#define SO_LOCK_FILTER 0x0028

#define SO_SELECT_ERR_QUEUE 0x0029

/* Security levels - as per NRL IPv6 - don't actually do anything */
#define SO_SECURITY_AUTHENTICATION 0x5001
#define SO_SECURITY_ENCRYPTION_TRANSPORT 0x5002
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/xtensa/include/uapi/asm/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,6 @@

#define SO_LOCK_FILTER 44

#define SO_SELECT_ERR_QUEUE 45

#endif /* _XTENSA_SOCKET_H */
1 change: 1 addition & 0 deletions trunk/include/net/sock.h
Original file line number Diff line number Diff line change
Expand Up @@ -667,6 +667,7 @@ enum sock_flags {
* user-space instead.
*/
SOCK_FILTER_LOCKED, /* Filter cannot be changed anymore */
SOCK_SELECT_ERR_QUEUE, /* Wake select on error queue */
};

static inline void sock_copy_flags(struct sock *nsk, struct sock *osk)
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/uapi/asm-generic/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,6 @@

#define SO_LOCK_FILTER 44

#define SO_SELECT_ERR_QUEUE 45

#endif /* __ASM_GENERIC_SOCKET_H */
3 changes: 2 additions & 1 deletion trunk/net/bluetooth/af_bluetooth.c
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,8 @@ unsigned int bt_sock_poll(struct file *file, struct socket *sock,
return bt_accept_poll(sk);

if (sk->sk_err || !skb_queue_empty(&sk->sk_error_queue))
mask |= POLLERR;
mask |= POLLERR |
sock_flag(sk, SOCK_SELECT_ERR_QUEUE) ? POLLPRI : 0;

if (sk->sk_shutdown & RCV_SHUTDOWN)
mask |= POLLRDHUP | POLLIN | POLLRDNORM;
Expand Down
4 changes: 3 additions & 1 deletion trunk/net/core/datagram.c
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,9 @@ unsigned int datagram_poll(struct file *file, struct socket *sock,

/* exceptional events? */
if (sk->sk_err || !skb_queue_empty(&sk->sk_error_queue))
mask |= POLLERR;
mask |= POLLERR |
sock_flag(sk, SOCK_SELECT_ERR_QUEUE) ? POLLPRI : 0;

if (sk->sk_shutdown & RCV_SHUTDOWN)
mask |= POLLRDHUP | POLLIN | POLLRDNORM;
if (sk->sk_shutdown == SHUTDOWN_MASK)
Expand Down
8 changes: 8 additions & 0 deletions trunk/net/core/sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -907,6 +907,10 @@ int sock_setsockopt(struct socket *sock, int level, int optname,
sock_valbool_flag(sk, SOCK_NOFCS, valbool);
break;

case SO_SELECT_ERR_QUEUE:
sock_valbool_flag(sk, SOCK_SELECT_ERR_QUEUE, valbool);
break;

default:
ret = -ENOPROTOOPT;
break;
Expand Down Expand Up @@ -1160,6 +1164,10 @@ int sock_getsockopt(struct socket *sock, int level, int optname,
v.val = sock_flag(sk, SOCK_FILTER_LOCKED);
break;

case SO_SELECT_ERR_QUEUE:
v.val = sock_flag(sk, SOCK_SELECT_ERR_QUEUE);
break;

default:
return -ENOPROTOOPT;
}
Expand Down
3 changes: 2 additions & 1 deletion trunk/net/iucv/af_iucv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1461,7 +1461,8 @@ unsigned int iucv_sock_poll(struct file *file, struct socket *sock,
return iucv_accept_poll(sk);

if (sk->sk_err || !skb_queue_empty(&sk->sk_error_queue))
mask |= POLLERR;
mask |= POLLERR |
sock_flag(sk, SOCK_SELECT_ERR_QUEUE) ? POLLPRI : 0;

if (sk->sk_shutdown & RCV_SHUTDOWN)
mask |= POLLRDHUP;
Expand Down
3 changes: 2 additions & 1 deletion trunk/net/nfc/llcp/sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,8 @@ static unsigned int llcp_sock_poll(struct file *file, struct socket *sock,
return llcp_accept_poll(sk);

if (sk->sk_err || !skb_queue_empty(&sk->sk_error_queue))
mask |= POLLERR;
mask |= POLLERR |
sock_flag(sk, SOCK_SELECT_ERR_QUEUE) ? POLLPRI : 0;

if (!skb_queue_empty(&sk->sk_receive_queue))
mask |= POLLIN | POLLRDNORM;
Expand Down
3 changes: 2 additions & 1 deletion trunk/net/sctp/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -6185,7 +6185,8 @@ unsigned int sctp_poll(struct file *file, struct socket *sock, poll_table *wait)

/* Is there any exceptional events? */
if (sk->sk_err || !skb_queue_empty(&sk->sk_error_queue))
mask |= POLLERR;
mask |= POLLERR |
sock_flag(sk, SOCK_SELECT_ERR_QUEUE) ? POLLPRI : 0;
if (sk->sk_shutdown & RCV_SHUTDOWN)
mask |= POLLRDHUP | POLLIN | POLLRDNORM;
if (sk->sk_shutdown == SHUTDOWN_MASK)
Expand Down
4 changes: 3 additions & 1 deletion trunk/net/unix/af_unix.c
Original file line number Diff line number Diff line change
Expand Up @@ -2196,7 +2196,9 @@ static unsigned int unix_dgram_poll(struct file *file, struct socket *sock,

/* exceptional events? */
if (sk->sk_err || !skb_queue_empty(&sk->sk_error_queue))
mask |= POLLERR;
mask |= POLLERR |
sock_flag(sk, SOCK_SELECT_ERR_QUEUE) ? POLLPRI : 0;

if (sk->sk_shutdown & RCV_SHUTDOWN)
mask |= POLLRDHUP | POLLIN | POLLRDNORM;
if (sk->sk_shutdown == SHUTDOWN_MASK)
Expand Down

0 comments on commit 58552da

Please sign in to comment.