]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - net/core/datagram.c
net: use skb_queue_empty_lockless() in poll() handlers
[mirror_ubuntu-bionic-kernel.git] / net / core / datagram.c
index 26f07b6ff23401a79ac89ec17c7f0ba7ca777b32..437202ca8d4c35fb4e02fe7f8a6870f37079a196 100644 (file)
@@ -844,7 +844,7 @@ unsigned int datagram_poll(struct file *file, struct socket *sock,
        mask = 0;
 
        /* 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);
 
@@ -854,7 +854,7 @@ unsigned int datagram_poll(struct file *file, struct socket *sock,
                mask |= POLLHUP;
 
        /* readable? */
-       if (!skb_queue_empty(&sk->sk_receive_queue))
+       if (!skb_queue_empty_lockless(&sk->sk_receive_queue))
                mask |= POLLIN | POLLRDNORM;
 
        /* Connection-based need to check for termination and startup */