Commit 30fabe5
tls: get psock ref after taking rxlock to avoid leak
[ Upstream commit 417e91e ]
At the start of tls_sw_recvmsg, we take a reference on the psock, and
then call tls_rx_reader_lock. If that fails, we return directly
without releasing the reference.
Instead of adding a new label, just take the reference after locking
has succeeded, since we don't need it before.
Fixes: 4cbc325 ("tls: rx: allow only one reader at a time")
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://lore.kernel.org/r/fe2ade22d030051ce4c3638704ed58b67d0df643.1711120964.git.sd@queasysnail.net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>1 parent f52c8f1 commit 30fabe5
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2062 | 2062 | | |
2063 | 2063 | | |
2064 | 2064 | | |
2065 | | - | |
2066 | 2065 | | |
2067 | 2066 | | |
2068 | 2067 | | |
| 2068 | + | |
2069 | 2069 | | |
2070 | 2070 | | |
2071 | 2071 | | |
| |||
0 commit comments