summaryrefslogtreecommitdiff
path: root/net/sctp
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2019-10-24 08:44:51 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-11-10 13:27:49 +0300
commit4f3df7f1eaa70903c2c0c73c0999e120fe452a2a (patch)
tree3c20c466e259af2fc6972a7d4a3e3c8f43b2e39f /net/sctp
parenteaf548feaa17308317bdac2903c1be820e5c186a (diff)
downloadlinux-4f3df7f1eaa70903c2c0c73c0999e120fe452a2a.tar.xz
net: use skb_queue_empty_lockless() in busy poll contexts
[ Upstream commit 3f926af3f4d688e2e11e7f8ed04e277a14d4d4a4 ] Busy polling usually runs without locks. Let's use skb_queue_empty_lockless() instead of skb_queue_empty() Also uses READ_ONCE() in __skb_try_recv_datagram() to address a similar potential problem. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/sctp')
-rw-r--r--net/sctp/socket.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index d922c78b6c29..c76631552722 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -8334,7 +8334,7 @@ struct sk_buff *sctp_skb_recv_datagram(struct sock *sk, int flags,
if (sk_can_busy_loop(sk)) {
sk_busy_loop(sk, noblock);
- if (!skb_queue_empty(&sk->sk_receive_queue))
+ if (!skb_queue_empty_lockless(&sk->sk_receive_queue))
continue;
}