mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 15:49:17 -04:00
chelsio/chtls: fix always leaking ctrl_skb
[ Upstream commit dbfe394dad33f99cf8458be50483ec40a5d29c34 ]
Correct skb refcount in alloc_ctrl_skb(), causing skb memleak
when chtls_send_abort() called with NULL skb.
it was always leaking the skb, correct it by incrementing skb
refs by one.
Fixes: cc35c88ae4 ("crypto : chtls - CPL handler definition")
Signed-off-by: Vinay Kumar Yadav <vinay.yadav@chelsio.com>
Link: https://lore.kernel.org/r/20201102173909.24826-1-vinay.yadav@chelsio.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
14d755a481
commit
7bf7b7c385
1 changed files with 1 additions and 1 deletions
|
|
@ -174,7 +174,7 @@ static struct sk_buff *alloc_ctrl_skb(struct sk_buff *skb, int len)
|
|||
{
|
||||
if (likely(skb && !skb_shared(skb) && !skb_cloned(skb))) {
|
||||
__skb_trim(skb, 0);
|
||||
refcount_add(2, &skb->users);
|
||||
refcount_inc(&skb->users);
|
||||
} else {
|
||||
skb = alloc_skb(len, GFP_KERNEL | __GFP_NOFAIL);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue