nvmet-tcp: use 'spin_lock_bh' for state_lock()
Subsystems (2)
PATCH 1/1 nvmet-tcp: use 'spin_lock_bh' for state_lock()
nvmet_tcp_schedule_release_queue() is called from socket state change callbacks, which may be called from an softirq context. So use 'spin_lock_bh' to avoid a spin lock warning.
Signed-off-by Hannes Reinecke <[email protected]>
--- drivers/nvme/target/tcp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/nvme/target/tcp.c +2 -2
@@ -1285,12 +1285,12 @@ static int nvmet_tcp_try_recv(struct nvmet_tcp_queue *queue,static void nvmet_tcp_schedule_release_queue (struct nvmet_tcp_queue *queue) { -spin_lock (&queue->state_lock); +spin_lock_bh (&queue->state_lock);if (queue->state !=NVMET_TCP_Q_DISCONNECTING ) { queue->state =NVMET_TCP_Q_DISCONNECTING ;queue_work (nvmet_wq, &queue->release_work); } -spin_unlock (&queue->state_lock); +spin_unlock_bh (&queue->state_lock); }static inline void nvmet_tcp_arm_queue_deadline (struct nvmet_tcp_queue *queue)
Signature · 1 line
2.35.3
Sagi Grimberg
maintainerPatch looks good, but please phrase the bug in
the patch title instead of the solution.
Quoted 5 lines
nvmet_tcp_schedule_release_queue()is called from socket state change callbacks, which may be called from an softirq context. So use 'spin_lock_bh' to avoid a spin lock warning.Signed-off-by Hannes Reinecke <[email protected]>
Please add a fixes tag.