diff options
author | 2022-04-11 12:19:08 -0700 | |
---|---|---|
committer | 2022-04-13 11:45:39 +0100 | |
commit | a30295c454725b293c7b2f45f6e60fcce0bc435e (patch) | |
tree | 40207475b4525cea72430d24d71a17369fc681b8 /net/tls | |
parent | ixp4xx_eth: fix error check return value of platform_get_irq() (diff) | |
download | linux-a30295c454725b293c7b2f45f6e60fcce0bc435e.tar.gz linux-a30295c454725b293c7b2f45f6e60fcce0bc435e.tar.bz2 linux-a30295c454725b293c7b2f45f6e60fcce0bc435e.zip |
tls: rx: consistently use unlocked accessors for rx_list
rx_list is protected by the socket lock, no need to take
the built-in spin lock on accesses.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tls')
-rw-r--r-- | net/tls/tls_sw.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw.c index 17c4e236ec8b..461734a27297 100644 --- a/net/tls/tls_sw.c +++ b/net/tls/tls_sw.c @@ -1709,7 +1709,7 @@ static int process_rx_list(struct tls_sw_context_rx *ctx, next_skb = skb_peek_next(skb, &ctx->rx_list); if (!is_peek) { - skb_unlink(skb, &ctx->rx_list); + __skb_unlink(skb, &ctx->rx_list); consume_skb(skb); } @@ -1824,7 +1824,7 @@ int tls_sw_recvmsg(struct sock *sk, ctx->recv_pkt = NULL; __strp_unpause(&ctx->strp); - skb_queue_tail(&ctx->rx_list, skb); + __skb_queue_tail(&ctx->rx_list, skb); if (async) { /* TLS 1.2-only, to_decrypt must be text length */ @@ -1845,7 +1845,7 @@ leave_on_list: if (err != __SK_PASS) { rxm->offset = rxm->offset + rxm->full_len; rxm->full_len = 0; - skb_unlink(skb, &ctx->rx_list); + __skb_unlink(skb, &ctx->rx_list); if (err == __SK_DROP) consume_skb(skb); continue; @@ -1873,7 +1873,7 @@ leave_on_list: decrypted += chunk; len -= chunk; - skb_unlink(skb, &ctx->rx_list); + __skb_unlink(skb, &ctx->rx_list); consume_skb(skb); /* Return full control message to userspace before trying @@ -2173,7 +2173,7 @@ void tls_sw_release_resources_rx(struct sock *sk) if (ctx->aead_recv) { kfree_skb(ctx->recv_pkt); ctx->recv_pkt = NULL; - skb_queue_purge(&ctx->rx_list); + __skb_queue_purge(&ctx->rx_list); crypto_free_aead(ctx->aead_recv); strp_stop(&ctx->strp); /* If tls_sw_strparser_arm() was not called (cleanup paths) |