[PATCH] nvmet-tcp: don't restore null sk_state_change

Shinichiro Kawasaki shinichiro.kawasaki at wdc.com
Wed Apr 23 18:38:48 PDT 2025


On Apr 23, 2025 / 16:06, Alistair Francis wrote:
> queue->state_change is set as part of nvmet_tcp_set_queue_sock(), but if
> the TCP connection isn't established when nvmet_tcp_set_queue_sock() is
> called then queue->state_change isn't set and sock->sk->sk_state_change
> isn't replaced.
> 
> As such we don't need to restore sock->sk->sk_state_change if
> queue->state_change is NULL.
...
> 
> Resolves: https://lore.kernel.org/linux-nvme/5hdonndzoqa265oq3bj6iarwtfk5dewxxjtbjvn5uqnwclpwt6@a2n6w3taxxex/
> Signed-off-by: Alistair Francis <alistair.francis at wdc.com>

Thanks for the fix. I applied this patch to the kernel v6.15-rc3 and confirmed
it avoids the hang at blktests test case nvme/062. I also ran whole blktests and
observed no regression.

Tested-by: Shin'ichiro Kawasaki <shinichiro.kawasaki at wdc.com>


More information about the Linux-nvme mailing list