Skip to content

Commit 8b73b45

Browse files
sagigrimbergChristoph Hellwig
authored and
Christoph Hellwig
committed
nvme-tcp: block BH in sk state_change sk callback
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]>
1 parent 79695dc commit 8b73b45

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
@@ -870,7 +870,7 @@ static void nvme_tcp_state_change(struct sock *sk)
870870
{
871871
struct nvme_tcp_queue *queue;
872872

873-
read_lock(&sk->sk_callback_lock);
873+
read_lock_bh(&sk->sk_callback_lock);
874874
queue = sk->sk_user_data;
875875
if (!queue)
876876
goto done;
@@ -891,7 +891,7 @@ static void nvme_tcp_state_change(struct sock *sk)
891891

892892
queue->state_change(sk);
893893
done:
894-
read_unlock(&sk->sk_callback_lock);
894+
read_unlock_bh(&sk->sk_callback_lock);
895895
}
896896

897897
static inline bool nvme_tcp_queue_more(struct nvme_tcp_queue *queue)

0 commit comments

Comments
 (0)