Skip to content
Commit 8080b462 authored by Vinay Kumar Yadav's avatar Vinay Kumar Yadav Committed by Jakub Kicinski
Browse files

chelsio/chtls: fix memory leaks caused by a race



race between user context and softirq causing memleak,
consider the call sequence scenario

chtls_setkey()         //user context
chtls_peer_close()
chtls_abort_req_rss()
chtls_setkey()         //user context

work request skb queued in chtls_setkey() won't be freed
because resources are already cleaned for this connection,
fix it by not queuing work request while socket is closing.

v1->v2:
- fix W=1 warning.

v2->v3:
- separate it out from another memleak fix.

Fixes: cc35c88a ("crypto : chtls - CPL handler definition")
Signed-off-by: default avatarVinay Kumar Yadav <vinay.yadav@chelsio.com>
Link: https://lore.kernel.org/r/20201102173650.24754-1-vinay.yadav@chelsio.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 5fd8477e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment