Skip to content

Commit 7c570c6

Browse files
sagigrimbergksacilotto
authored andcommitted
nvme-tcp: block BH in sk state_change sk callback
BugLink: https://bugs.launchpad.net/bugs/1929615 [ Upstream commit 8b73b45 ] The TCP stack can run from process context for a long time so we should disable BH here. Fixes: 3f2304f ("nvme-tcp: add NVMe over TCP host driver") Signed-off-by: Sagi Grimberg <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Kamal Mostafa <[email protected]> Signed-off-by: Kleber Sacilotto de Souza <[email protected]>
1 parent 1d89e2a commit 7c570c6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/nvme/host/tcp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -816,7 +816,7 @@ static void nvme_tcp_state_change(struct sock *sk)
816816
{
817817
struct nvme_tcp_queue *queue;
818818

819-
read_lock(&sk->sk_callback_lock);
819+
read_lock_bh(&sk->sk_callback_lock);
820820
queue = sk->sk_user_data;
821821
if (!queue)
822822
goto done;
@@ -838,7 +838,7 @@ static void nvme_tcp_state_change(struct sock *sk)
838838

839839
queue->state_change(sk);
840840
done:
841-
read_unlock(&sk->sk_callback_lock);
841+
read_unlock_bh(&sk->sk_callback_lock);
842842
}
843843

844844
static inline void nvme_tcp_done_send_req(struct nvme_tcp_queue *queue)

0 commit comments

Comments
 (0)