]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
nvmet-tcp: fix callback lock for TLS handshake
authorMaurizio Lombardi <mlombard@redhat.com>
Fri, 4 Jul 2025 14:44:54 +0000 (16:44 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 24 Jul 2025 06:58:35 +0000 (08:58 +0200)
commit6cbd9f5ad8f2b67eba7093acbc7d924b0aa9dfc2
tree7a3bbc9ebc690b3144d1f3af56641c10fa48ea66
parent28fbf9795a218229731bc48fb2ef016b8ba304d7
nvmet-tcp: fix callback lock for TLS handshake

[ Upstream commit 0523c6cc87e558c50ff4489c87c54c55068b1169 ]

When restoring the default socket callbacks during a TLS handshake, we
need to acquire a write lock on sk_callback_lock.  Previously, a read
lock was used, which is insufficient for modifying sk_user_data and
sk_data_ready.

Fixes: 675b453e0241 ("nvmet-tcp: enable TLS handshake upcall")
Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/nvme/target/tcp.c