From: Sagi Grimberg Date: Sun, 21 Mar 2021 07:08:48 +0000 (-0700) Subject: nvme-tcp: block BH in sk state_change sk callback X-Git-Tag: v5.4.119~93 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=ced0760eb45ad9db08fb09b9ff35e6b441b67db5;p=users%2Fdwmw2%2Flinux.git nvme-tcp: block BH in sk state_change sk callback [ Upstream commit 8b73b45d54a14588f86792869bfb23098ea254cb ] The TCP stack can run from process context for a long time so we should disable BH here. Fixes: 3f2304f8c6d6 ("nvme-tcp: add NVMe over TCP host driver") Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig Signed-off-by: Sasha Levin --- diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c index ac3503ea54c46..718152adc6254 100644 --- a/drivers/nvme/host/tcp.c +++ b/drivers/nvme/host/tcp.c @@ -816,7 +816,7 @@ static void nvme_tcp_state_change(struct sock *sk) { struct nvme_tcp_queue *queue; - read_lock(&sk->sk_callback_lock); + read_lock_bh(&sk->sk_callback_lock); queue = sk->sk_user_data; if (!queue) goto done; @@ -838,7 +838,7 @@ static void nvme_tcp_state_change(struct sock *sk) queue->state_change(sk); done: - read_unlock(&sk->sk_callback_lock); + read_unlock_bh(&sk->sk_callback_lock); } static inline void nvme_tcp_done_send_req(struct nvme_tcp_queue *queue)