diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/bluetooth/af_bluetooth.c | 3 | ||||
-rw-r--r-- | net/core/datagram.c | 4 | ||||
-rw-r--r-- | net/core/sock.c | 8 | ||||
-rw-r--r-- | net/iucv/af_iucv.c | 3 | ||||
-rw-r--r-- | net/nfc/llcp/sock.c | 3 | ||||
-rw-r--r-- | net/sctp/socket.c | 3 | ||||
-rw-r--r-- | net/unix/af_unix.c | 4 |
7 files changed, 22 insertions, 6 deletions
diff --git a/net/bluetooth/af_bluetooth.c b/net/bluetooth/af_bluetooth.c index d3ee69b35a78..409902f892ff 100644 --- a/net/bluetooth/af_bluetooth.c +++ b/net/bluetooth/af_bluetooth.c | |||
@@ -422,7 +422,8 @@ unsigned int bt_sock_poll(struct file *file, struct socket *sock, | |||
422 | return bt_accept_poll(sk); | 422 | return bt_accept_poll(sk); |
423 | 423 | ||
424 | if (sk->sk_err || !skb_queue_empty(&sk->sk_error_queue)) | 424 | if (sk->sk_err || !skb_queue_empty(&sk->sk_error_queue)) |
425 | mask |= POLLERR; | 425 | mask |= POLLERR | |
426 | sock_flag(sk, SOCK_SELECT_ERR_QUEUE) ? POLLPRI : 0; | ||
426 | 427 | ||
427 | if (sk->sk_shutdown & RCV_SHUTDOWN) | 428 | if (sk->sk_shutdown & RCV_SHUTDOWN) |
428 | mask |= POLLRDHUP | POLLIN | POLLRDNORM; | 429 | mask |= POLLRDHUP | POLLIN | POLLRDNORM; |
diff --git a/net/core/datagram.c b/net/core/datagram.c index 368f9c3f9dc6..36da5b663514 100644 --- a/net/core/datagram.c +++ b/net/core/datagram.c | |||
@@ -749,7 +749,9 @@ unsigned int datagram_poll(struct file *file, struct socket *sock, | |||
749 | 749 | ||
750 | /* exceptional events? */ | 750 | /* exceptional events? */ |
751 | if (sk->sk_err || !skb_queue_empty(&sk->sk_error_queue)) | 751 | if (sk->sk_err || !skb_queue_empty(&sk->sk_error_queue)) |
752 | mask |= POLLERR; | 752 | mask |= POLLERR | |
753 | sock_flag(sk, SOCK_SELECT_ERR_QUEUE) ? POLLPRI : 0; | ||
754 | |||
753 | if (sk->sk_shutdown & RCV_SHUTDOWN) | 755 | if (sk->sk_shutdown & RCV_SHUTDOWN) |
754 | mask |= POLLRDHUP | POLLIN | POLLRDNORM; | 756 | mask |= POLLRDHUP | POLLIN | POLLRDNORM; |
755 | if (sk->sk_shutdown == SHUTDOWN_MASK) | 757 | if (sk->sk_shutdown == SHUTDOWN_MASK) |
diff --git a/net/core/sock.c b/net/core/sock.c index a19e728d5fb6..2ff5f3619a8d 100644 --- a/net/core/sock.c +++ b/net/core/sock.c | |||
@@ -907,6 +907,10 @@ set_rcvbuf: | |||
907 | sock_valbool_flag(sk, SOCK_NOFCS, valbool); | 907 | sock_valbool_flag(sk, SOCK_NOFCS, valbool); |
908 | break; | 908 | break; |
909 | 909 | ||
910 | case SO_SELECT_ERR_QUEUE: | ||
911 | sock_valbool_flag(sk, SOCK_SELECT_ERR_QUEUE, valbool); | ||
912 | break; | ||
913 | |||
910 | default: | 914 | default: |
911 | ret = -ENOPROTOOPT; | 915 | ret = -ENOPROTOOPT; |
912 | break; | 916 | break; |
@@ -1160,6 +1164,10 @@ int sock_getsockopt(struct socket *sock, int level, int optname, | |||
1160 | v.val = sock_flag(sk, SOCK_FILTER_LOCKED); | 1164 | v.val = sock_flag(sk, SOCK_FILTER_LOCKED); |
1161 | break; | 1165 | break; |
1162 | 1166 | ||
1167 | case SO_SELECT_ERR_QUEUE: | ||
1168 | v.val = sock_flag(sk, SOCK_SELECT_ERR_QUEUE); | ||
1169 | break; | ||
1170 | |||
1163 | default: | 1171 | default: |
1164 | return -ENOPROTOOPT; | 1172 | return -ENOPROTOOPT; |
1165 | } | 1173 | } |
diff --git a/net/iucv/af_iucv.c b/net/iucv/af_iucv.c index a7d11ffe4284..f0550a38f295 100644 --- a/net/iucv/af_iucv.c +++ b/net/iucv/af_iucv.c | |||
@@ -1461,7 +1461,8 @@ unsigned int iucv_sock_poll(struct file *file, struct socket *sock, | |||
1461 | return iucv_accept_poll(sk); | 1461 | return iucv_accept_poll(sk); |
1462 | 1462 | ||
1463 | if (sk->sk_err || !skb_queue_empty(&sk->sk_error_queue)) | 1463 | if (sk->sk_err || !skb_queue_empty(&sk->sk_error_queue)) |
1464 | mask |= POLLERR; | 1464 | mask |= POLLERR | |
1465 | sock_flag(sk, SOCK_SELECT_ERR_QUEUE) ? POLLPRI : 0; | ||
1465 | 1466 | ||
1466 | if (sk->sk_shutdown & RCV_SHUTDOWN) | 1467 | if (sk->sk_shutdown & RCV_SHUTDOWN) |
1467 | mask |= POLLRDHUP; | 1468 | mask |= POLLRDHUP; |
diff --git a/net/nfc/llcp/sock.c b/net/nfc/llcp/sock.c index f1b377e247fe..2d55e8a45958 100644 --- a/net/nfc/llcp/sock.c +++ b/net/nfc/llcp/sock.c | |||
@@ -521,7 +521,8 @@ static unsigned int llcp_sock_poll(struct file *file, struct socket *sock, | |||
521 | return llcp_accept_poll(sk); | 521 | return llcp_accept_poll(sk); |
522 | 522 | ||
523 | if (sk->sk_err || !skb_queue_empty(&sk->sk_error_queue)) | 523 | if (sk->sk_err || !skb_queue_empty(&sk->sk_error_queue)) |
524 | mask |= POLLERR; | 524 | mask |= POLLERR | |
525 | sock_flag(sk, SOCK_SELECT_ERR_QUEUE) ? POLLPRI : 0; | ||
525 | 526 | ||
526 | if (!skb_queue_empty(&sk->sk_receive_queue)) | 527 | if (!skb_queue_empty(&sk->sk_receive_queue)) |
527 | mask |= POLLIN | POLLRDNORM; | 528 | mask |= POLLIN | POLLRDNORM; |
diff --git a/net/sctp/socket.c b/net/sctp/socket.c index b9070736b8d9..dd21ae3013d8 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c | |||
@@ -6185,7 +6185,8 @@ unsigned int sctp_poll(struct file *file, struct socket *sock, poll_table *wait) | |||
6185 | 6185 | ||
6186 | /* Is there any exceptional events? */ | 6186 | /* Is there any exceptional events? */ |
6187 | if (sk->sk_err || !skb_queue_empty(&sk->sk_error_queue)) | 6187 | if (sk->sk_err || !skb_queue_empty(&sk->sk_error_queue)) |
6188 | mask |= POLLERR; | 6188 | mask |= POLLERR | |
6189 | sock_flag(sk, SOCK_SELECT_ERR_QUEUE) ? POLLPRI : 0; | ||
6189 | if (sk->sk_shutdown & RCV_SHUTDOWN) | 6190 | if (sk->sk_shutdown & RCV_SHUTDOWN) |
6190 | mask |= POLLRDHUP | POLLIN | POLLRDNORM; | 6191 | mask |= POLLRDHUP | POLLIN | POLLRDNORM; |
6191 | if (sk->sk_shutdown == SHUTDOWN_MASK) | 6192 | if (sk->sk_shutdown == SHUTDOWN_MASK) |
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index 971282b6f6a3..fb7a63ff71a5 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c | |||
@@ -2196,7 +2196,9 @@ static unsigned int unix_dgram_poll(struct file *file, struct socket *sock, | |||
2196 | 2196 | ||
2197 | /* exceptional events? */ | 2197 | /* exceptional events? */ |
2198 | if (sk->sk_err || !skb_queue_empty(&sk->sk_error_queue)) | 2198 | if (sk->sk_err || !skb_queue_empty(&sk->sk_error_queue)) |
2199 | mask |= POLLERR; | 2199 | mask |= POLLERR | |
2200 | sock_flag(sk, SOCK_SELECT_ERR_QUEUE) ? POLLPRI : 0; | ||
2201 | |||
2200 | if (sk->sk_shutdown & RCV_SHUTDOWN) | 2202 | if (sk->sk_shutdown & RCV_SHUTDOWN) |
2201 | mask |= POLLRDHUP | POLLIN | POLLRDNORM; | 2203 | mask |= POLLRDHUP | POLLIN | POLLRDNORM; |
2202 | if (sk->sk_shutdown == SHUTDOWN_MASK) | 2204 | if (sk->sk_shutdown == SHUTDOWN_MASK) |