Skip to content

Commit f86e5bf

Browse files
sagigrimbergChristoph Hellwig
authored andcommitted
nvme-tcp: don't poll a non-live queue
In error recovery we might be removing the queue so check we can actually poll before we do. Reported-by: Mark Wunderlich <[email protected]> Tested-by: Mark Wunderlich <[email protected]> Signed-off-by: Sagi Grimberg <[email protected]> Signed-off-by: Keith Busch <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
1 parent 25e5cb7 commit f86e5bf

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/nvme/host/tcp.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2299,6 +2299,9 @@ static int nvme_tcp_poll(struct blk_mq_hw_ctx *hctx)
22992299
struct nvme_tcp_queue *queue = hctx->driver_data;
23002300
struct sock *sk = queue->sock->sk;
23012301

2302+
if (!test_bit(NVME_TCP_Q_LIVE, &queue->flags))
2303+
return 0;
2304+
23022305
if (sk_can_busy_loop(sk) && skb_queue_empty_lockless(&sk->sk_receive_queue))
23032306
sk_busy_loop(sk, true);
23042307
nvme_tcp_try_recv(queue);

0 commit comments

Comments
 (0)