linux/drivers/nvme
Hannes Reinecke 6e0c7503a5 nvmet-tcp: fixup hang in nvmet_tcp_listen_data_ready()
[ Upstream commit 2fa8961d3a ]

When the socket is closed while in TCP_LISTEN a callback is run to
flush all outstanding packets, which in turns calls
nvmet_tcp_listen_data_ready() with the sk_callback_lock held.
So we need to check if we are in TCP_LISTEN before attempting
to get the sk_callback_lock() to avoid a deadlock.

Link: https://lore.kernel.org/linux-nvme/CAHj4cs-zu7eVB78yUpFjVe2UqMWFkLk8p+DaS3qj+uiGCXBAoA@mail.gmail.com/
Tested-by:  Yi Zhang <yi.zhang@redhat.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Hannes Reinecke <hare@kernel.org>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2026-02-11 13:40:22 +01:00
..
common move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
host nvme-fc: release admin tagset if init fails 2026-02-11 13:40:22 +01:00
target nvmet-tcp: fixup hang in nvmet_tcp_listen_data_ready() 2026-02-11 13:40:22 +01:00
Kconfig nvme: implement In-Band authentication 2022-08-02 17:14:49 -06:00
Makefile nvme: common: make keyring and auth separate modules 2023-11-07 10:05:15 -08:00