public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] nvmet-tcp: do not try to cancel uninitialized tls_handshake_tmo_work
@ 2023-10-19 12:53 Hannes Reinecke
  2023-10-19 13:01 ` Jens Axboe
  0 siblings, 1 reply; 3+ messages in thread
From: Hannes Reinecke @ 2023-10-19 12:53 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.

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] 3+ messages in thread

end of thread, other threads:[~2023-10-19 13:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-19 12:53 [PATCH] nvmet-tcp: do not try to cancel uninitialized tls_handshake_tmo_work Hannes Reinecke
2023-10-19 13:01 ` Jens Axboe
2023-10-19 13:07   ` Hannes Reinecke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox