linux-stable/drivers/infiniband
Kashyap Desai 5710bc67d7 RDMA/bnxt_re: Avoid calling wake_up threads from spin_lock context
[ Upstream commit 3099bcdc19 ]

bnxt_qplib_service_creq can be called from interrupt or tasklet or
process context. So the function take irq variant  of spin_lock.
But when wake_up is invoked with the lock held, it is putting the
calling context to sleep.

[exception RIP: __wake_up_common+190]
RIP: ffffffffb7539d7e  RSP: ffffa73300207ad8  RFLAGS: 00000083
RAX: 0000000000000001  RBX: ffff91fa295f69b8  RCX: dead000000000200
RDX: ffffa733344af940  RSI: ffffa73336527940  RDI: ffffa73336527940
RBP: 000000000000001c   R8: 0000000000000002   R9: 00000000000299c0
R10: 0000017230de82c5  R11: 0000000000000002  R12: ffffa73300207b28
R13: 0000000000000000  R14: ffffa733341bf928  R15: 0000000000000000
ORIG_RAX: ffffffffffffffff  CS: 0010  SS: 0018

Call the wakeup after releasing the lock.

Fixes: 1ac5a40479 ("RDMA/bnxt_re: Add bnxt_re RoCE driver")
Signed-off-by: Kashyap Desai <kashyap.desai@broadcom.com>
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
Link: https://lore.kernel.org/r/1686308514-11996-3-git-send-email-selvin.xavier@broadcom.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-07-11 19:39:41 +02:00
..
core IB/uverbs: Fix to consider event queue closing also upon non-blocking mode 2023-06-21 16:02:15 +02:00
hw RDMA/bnxt_re: Avoid calling wake_up threads from spin_lock context 2023-07-11 19:39:41 +02:00
sw RDMA/rxe: Fix access checks in rxe_check_bind_mw 2023-07-11 19:39:41 +02:00
ulp IB/isert: Fix incorrect release of isert connection 2023-06-21 16:02:15 +02:00
Kconfig RDMA: Disable IB HW for UML 2022-12-04 15:22:03 +02:00
Makefile