linux/drivers/nvme/target
Hannes Reinecke 1c90f930e7 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:41:51 +01:00
..
admin-cmd.c nvme: spelling fixes 2025-06-04 10:23:28 +02:00
auth.c nvmet-auth: update sc_c in target host hash calculation 2025-11-17 08:05:58 -08:00
configfs.c for-6.14/block-20250118 2025-01-20 19:38:46 -08:00
core.c nvmet: add safety check for subsys lock 2025-09-23 15:38:28 -07:00
debugfs.c These are objtool fixes and updates by Josh Poimboeuf, centered 2025-04-02 10:30:10 -07:00
debugfs.h nvmet: add debugfs support 2024-06-24 12:53:42 -07:00
discovery.c nvmet: replace strncpy with strscpy 2025-05-20 05:34:25 +02:00
fabrics-cmd-auth.c nvmet-auth: update sc_c in target host hash calculation 2025-11-17 08:05:58 -08:00
fabrics-cmd.c nvmet: fabrics: add CQ init and destroy 2025-05-20 05:34:25 +02:00
fc.c nvmet-fc: avoid scheduling association deletion twice 2025-09-15 08:52:57 -07:00
fcloop.c nvmet-fcloop: call done callback even when remote port is gone 2025-09-15 08:52:57 -07:00
io-cmd-bdev.c nvmet: fix race in nvmet_bio_done() leading to NULL pointer dereference 2026-02-06 16:57:39 +01:00
io-cmd-file.c nvmet: use bvec_set_page to initialize bvecs 2023-02-03 08:20:55 -07:00
Kconfig crash_dump, nvme: select CONFIGFS_FS as built-in 2025-05-27 19:40:33 -07:00
loop.c nvmet: simplify the nvmet_req_init() interface 2025-05-20 05:34:26 +02:00
Makefile nvmet: New NVMe PCI endpoint function target driver 2025-01-10 19:30:49 -08:00
nvmet.h nvmet-auth: update sc_c in target host hash calculation 2025-11-17 08:05:58 -08:00
passthru.c nvmet: add support for FDP in fabrics passthru path 2025-07-31 06:35:43 -07:00
pci-epf.c nvmet: pci-epf: move DMA initialization to EPC init callback 2026-01-08 10:17:01 +01:00
pr.c nvmet-loop: avoid using mutex in IO hotpath 2024-12-27 13:24:00 -08:00
rdma.c nvme: fix various comment typos 2025-07-31 06:35:58 -07:00
tcp.c nvmet-tcp: fixup hang in nvmet_tcp_listen_data_ready() 2026-02-11 13:41:51 +01:00
trace.c nvmet: add tracing of reservation commands 2024-11-13 08:51:24 -08:00
trace.h nvme: trace: avoid memcpy overflow warning 2024-01-05 13:16:18 -08:00
zns.c nvme: fix multiple spelling and grammar issues in host drivers 2025-07-17 13:38:06 +02:00