summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorVakul Garg <vakul.garg@nxp.com>2019-03-21 11:59:57 +0000
committerDavid S. Miller <davem@davemloft.net>2019-03-21 10:14:26 -0700
commita88c26f671b0860cc93c654d45f472e43831fb33 (patch)
treea2e2d157fdfa5e719d69be7b994c90c1644ff90a /net
parent08e046c8966a872a4fb047aa940b5c991ee5635d (diff)
downloadlinux-a88c26f671b0860cc93c654d45f472e43831fb33.tar.bz2
net/tls: Replace kfree_skb() with consume_skb()
To free the skb in normal course of processing, consume_skb() should be used. Only for failure paths, skb_free() is intended to be used. https://www.kernel.org/doc/htmldocs/networking/API-consume-skb.html Signed-off-by: Vakul Garg <vakul.garg@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/tls/tls_sw.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw.c
index f635c103581e..4f821edeeae6 100644
--- a/net/tls/tls_sw.c
+++ b/net/tls/tls_sw.c
@@ -223,7 +223,7 @@ static int tls_do_decryption(struct sock *sk,
/* Using skb->sk to push sk through to crypto async callback
* handler. This allows propagating errors up to the socket
* if needed. It _must_ be cleared in the async handler
- * before kfree_skb is called. We _know_ skb->sk is NULL
+ * before consume_skb is called. We _know_ skb->sk is NULL
* because it is a clone from strparser.
*/
skb->sk = sk;
@@ -1535,7 +1535,7 @@ static bool tls_sw_advance_skb(struct sock *sk, struct sk_buff *skb,
rxm->full_len -= len;
return false;
}
- kfree_skb(skb);
+ consume_skb(skb);
}
/* Finished with message */
@@ -1644,7 +1644,7 @@ static int process_rx_list(struct tls_sw_context_rx *ctx,
if (!is_peek) {
skb_unlink(skb, &ctx->rx_list);
- kfree_skb(skb);
+ consume_skb(skb);
}
skb = next_skb;