nvmet-tcp: do not try to cancel uninitialized tls_handshake_tmo_work
Subsystems (2)
PATCH 1/1 nvmet-tcp: do not try to cancel uninitialized tls_handshake_tmo_work
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 <[email protected]>
Signed-off-by Hannes Reinecke <[email protected]>
--- drivers/nvme/target/tcp.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/nvme/target/tcp.c +2 -0
@@ -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 ;
Signature · 1 line
2.35.3
Jens Axboe
maintainerQuoted 3 lines · Hannes Reinecke
The TLS handshake timeout workqueue is only initialized if TLS is configured, so we shouldn't try to de-initialize it unconditionally.
What about the one in nvmet_tcp_tls_handshake_done()?
Please include a fixes line.
Signature · 1 line
Jens Axboe
Quoted 7 lines · Jens Axboe
Quoted 3 lines · Hannes Reinecke
The TLS handshake timeout workqueue is only initialized if TLS is configured, so we shouldn't try to de-initialize it unconditionally.
What about the one in
nvmet_tcp_tls_handshake_done()?
That already is encapsulated by the config variable, so nothing to be done here.
Quoted 2 lines
Please include a fixes line.
Oh, sure.
Cheers,
Hannes