]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - net/sctp/socket.c
net: use skb_queue_empty_lockless() in poll() handlers
[mirror_ubuntu-bionic-kernel.git] / net / sctp / socket.c
index f06bb6eaf010a9ccfcf920a7fc7292f288509a99..b51d7829e5a0a20d0c5298cbb07891e86251e03a 100644 (file)
@@ -7525,7 +7525,7 @@ unsigned int sctp_poll(struct file *file, struct socket *sock, poll_table *wait)
        mask = 0;
 
        /* Is there any exceptional events?  */
-       if (sk->sk_err || !skb_queue_empty(&sk->sk_error_queue))
+       if (sk->sk_err || !skb_queue_empty_lockless(&sk->sk_error_queue))
                mask |= POLLERR |
                        (sock_flag(sk, SOCK_SELECT_ERR_QUEUE) ? POLLPRI : 0);
        if (sk->sk_shutdown & RCV_SHUTDOWN)
@@ -7534,7 +7534,7 @@ unsigned int sctp_poll(struct file *file, struct socket *sock, poll_table *wait)
                mask |= POLLHUP;
 
        /* Is it readable?  Reconsider this code with TCP-style support.  */
-       if (!skb_queue_empty(&sk->sk_receive_queue))
+       if (!skb_queue_empty_lockless(&sk->sk_receive_queue))
                mask |= POLLIN | POLLRDNORM;
 
        /* The association is either gone or not ready.  */