* [PATCHv2] nvmet-tcp: do not try to cancel uninitialized tls_handshake_tmo_work
@ 2023-10-19 13:34 Hannes Reinecke
2023-10-19 14:17 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: Hannes Reinecke @ 2023-10-19 13:34 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Sagi Grimberg, Keith Busch, Yi Zhang, linux-nvme, Hannes Reinecke,
Maurizio Lombardi
The TLS handshake timeout workqueue is only initialized if TLS
is configured, so we shouldn't try to de-initialize it
unconditionally.
Fixes: 675b453e0241 ("nvmet-tcp: enable TLS handshake upcall")
Suggested-by: Maurizio Lombardi <mlombard@redhat.com>
Signed-off-by: Hannes Reinecke <hare@suse.de>
---
drivers/nvme/target/tcp.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/nvme/target/tcp.c b/drivers/nvme/target/tcp.c
index 4336fe048e43..e155bcaa42fa 100644
--- a/drivers/nvme/target/tcp.c
+++ b/drivers/nvme/target/tcp.c
@@ -1587,7 +1587,9 @@ static void nvmet_tcp_release_queue_work(struct work_struct *w)
mutex_unlock(&nvmet_tcp_queue_mutex);
nvmet_tcp_restore_socket_callbacks(queue);
+#ifdef CONFIG_NVME_TARGET_TCP_TLS
cancel_delayed_work_sync(&queue->tls_handshake_tmo_work);
+#endif
cancel_work_sync(&queue->io_work);
/* stop accepting incoming data */
queue->rcv_state = NVMET_TCP_RECV_ERR;
--
2.35.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCHv2] nvmet-tcp: do not try to cancel uninitialized tls_handshake_tmo_work
2023-10-19 13:34 [PATCHv2] nvmet-tcp: do not try to cancel uninitialized tls_handshake_tmo_work Hannes Reinecke
@ 2023-10-19 14:17 ` Jens Axboe
0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2023-10-19 14:17 UTC (permalink / raw)
To: Hannes Reinecke, Christoph Hellwig
Cc: Sagi Grimberg, Keith Busch, Yi Zhang, linux-nvme,
Maurizio Lombardi
On 10/19/23 7:34 AM, Hannes Reinecke wrote:
> The TLS handshake timeout workqueue is only initialized if TLS
> is configured, so we shouldn't try to de-initialize it
> unconditionally.
Please fix this properly rather than working around it. Either put the
work item inside CONFIG_NVME_TARGET_TCP_TLS so that any unintended use
can't happen in the future, or just initialize the darn thing at setup
time rather than have this conditional.
--
Jens Axboe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-10-19 14:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-19 13:34 [PATCHv2] nvmet-tcp: do not try to cancel uninitialized tls_handshake_tmo_work Hannes Reinecke
2023-10-19 14:17 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox