summaryrefslogtreecommitdiffstats
path: root/net/sctp/socket.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2019-10-24 01:44:50 -0400
committerDavid S. Miller <davem@davemloft.net>2019-10-28 16:33:41 -0400
commit3ef7cf57c72f32f61e97f8fa401bc39ea1f1a5d4 (patch)
tree7f962942a142ed611e6c063171ef0092f8af8fd8 /net/sctp/socket.c
parent137a0dbe3426fd7bcfe3f8117b36a87b3590e4eb (diff)
net: use skb_queue_empty_lockless() in poll() handlers
Many poll() handlers are lockless. Using skb_queue_empty_lockless() instead of skb_queue_empty() is more appropriate. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/socket.c')
-rw-r--r--net/sctp/socket.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index 5ca0ec0e823c..cfb25391b8b0 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -8476,7 +8476,7 @@ __poll_t sctp_poll(struct file *file, struct socket *sock, poll_table *wait)
8476 mask = 0; 8476 mask = 0;
8477 8477
8478 /* Is there any exceptional events? */ 8478 /* Is there any exceptional events? */
8479 if (sk->sk_err || !skb_queue_empty(&sk->sk_error_queue)) 8479 if (sk->sk_err || !skb_queue_empty_lockless(&sk->sk_error_queue))
8480 mask |= EPOLLERR | 8480 mask |= EPOLLERR |
8481 (sock_flag(sk, SOCK_SELECT_ERR_QUEUE) ? EPOLLPRI : 0); 8481 (sock_flag(sk, SOCK_SELECT_ERR_QUEUE) ? EPOLLPRI : 0);
8482 if (sk->sk_shutdown & RCV_SHUTDOWN) 8482 if (sk->sk_shutdown & RCV_SHUTDOWN)
@@ -8485,7 +8485,7 @@ __poll_t sctp_poll(struct file *file, struct socket *sock, poll_table *wait)
8485 mask |= EPOLLHUP; 8485 mask |= EPOLLHUP;
8486 8486
8487 /* Is it readable? Reconsider this code with TCP-style support. */ 8487 /* Is it readable? Reconsider this code with TCP-style support. */
8488 if (!skb_queue_empty(&sk->sk_receive_queue)) 8488 if (!skb_queue_empty_lockless(&sk->sk_receive_queue))
8489 mask |= EPOLLIN | EPOLLRDNORM; 8489 mask |= EPOLLIN | EPOLLRDNORM;
8490 8490
8491 /* The association is either gone or not ready. */ 8491 /* The association is either gone or not ready. */