diff options
author | Sagi Grimberg <sagi@grimberg.me> | 2021-03-21 00:08:48 -0700 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2021-04-02 18:48:28 +0200 |
commit | 8b73b45d54a14588f86792869bfb23098ea254cb (patch) | |
tree | 4ceb47001af72309e1d542e1e20ca8ab59fb6209 /drivers/nvme/host/tcp.c | |
parent | 79695dcd9ad4463a82def7f42960e6d7baa76f0b (diff) | |
download | lwn-8b73b45d54a14588f86792869bfb23098ea254cb.tar.gz lwn-8b73b45d54a14588f86792869bfb23098ea254cb.zip |
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: 3f2304f8c6d6 ("nvme-tcp: add NVMe over TCP host driver")
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/nvme/host/tcp.c')
-rw-r--r-- | drivers/nvme/host/tcp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c index 7de9bee1e5e9..b9e8ea3a7501 100644 --- a/drivers/nvme/host/tcp.c +++ b/drivers/nvme/host/tcp.c @@ -870,7 +870,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; @@ -891,7 +891,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 bool nvme_tcp_queue_more(struct nvme_tcp_queue *queue) |