nvmet-tcp: fix callback lock for TLS handshake
authorMaurizio Lombardi <mlombard@redhat.com>
Fri, 4 Jul 2025 14:44:54 +0000 (16:44 +0200)
committerChristoph Hellwig <hch@lst.de>
Tue, 15 Jul 2025 07:49:13 +0000 (09:49 +0200)
commit0523c6cc87e558c50ff4489c87c54c55068b1169
tree9f0f24498a5c72802e76e592029237d0a84d2350
parent71257925e83eae1cb6913d65ca71927d2220e6d1
nvmet-tcp: fix callback lock for TLS handshake

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>
drivers/nvme/target/tcp.c