summaryrefslogtreecommitdiff
path: root/block/elevator.c
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2024-02-07 04:18:19 +0300
committerDavid S. Miller <davem@davemloft.net>2024-02-11 00:38:19 +0300
commitaec7961916f3f9e88766e2688992da6980f11b8d (patch)
tree242e2246f9fb2c26a93dcde3bd597bd5f8100fad /block/elevator.c
parentc57ca512f3b68ddcd62bda9cc24a8f5584ab01b1 (diff)
downloadlinux-aec7961916f3f9e88766e2688992da6980f11b8d.tar.xz
tls: fix race between async notify and socket close
The submitting thread (one which called recvmsg/sendmsg) may exit as soon as the async crypto handler calls complete() so any code past that point risks touching already freed data. Try to avoid the locking and extra flags altogether. Have the main thread hold an extra reference, this way we can depend solely on the atomic ref counter for synchronization. Don't futz with reiniting the completion, either, we are now tightly controlling when completion fires. Reported-by: valis <sec@valis.email> Fixes: 0cada33241d9 ("net/tls: fix race condition causing kernel panic") Signed-off-by: Jakub Kicinski <kuba@kernel.org> Reviewed-by: Simon Horman <horms@kernel.org> Reviewed-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Sabrina Dubroca <sd@queasysnail.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'block/elevator.c')
0 files changed, 0 insertions, 0 deletions