diff options
author | Eric Dumazet <edumazet@google.com> | 2019-10-23 22:44:51 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-11-10 11:27:49 +0100 |
commit | 4f3df7f1eaa70903c2c0c73c0999e120fe452a2a (patch) | |
tree | 3c20c466e259af2fc6972a7d4a3e3c8f43b2e39f /drivers/crypto | |
parent | eaf548feaa17308317bdac2903c1be820e5c186a (diff) | |
download | linux-stable-4f3df7f1eaa70903c2c0c73c0999e120fe452a2a.tar.gz linux-stable-4f3df7f1eaa70903c2c0c73c0999e120fe452a2a.tar.bz2 linux-stable-4f3df7f1eaa70903c2c0c73c0999e120fe452a2a.zip |
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 'drivers/crypto')
-rw-r--r-- | drivers/crypto/chelsio/chtls/chtls_io.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/crypto/chelsio/chtls/chtls_io.c b/drivers/crypto/chelsio/chtls/chtls_io.c index afebbd87c4aa..1587f4ac6821 100644 --- a/drivers/crypto/chelsio/chtls/chtls_io.c +++ b/drivers/crypto/chelsio/chtls/chtls_io.c @@ -1716,7 +1716,7 @@ int chtls_recvmsg(struct sock *sk, struct msghdr *msg, size_t len, return peekmsg(sk, msg, len, nonblock, flags); if (sk_can_busy_loop(sk) && - skb_queue_empty(&sk->sk_receive_queue) && + skb_queue_empty_lockless(&sk->sk_receive_queue) && sk->sk_state == TCP_ESTABLISHED) sk_busy_loop(sk, nonblock); |