RDMA/bnxt_re: Avoid calling wake_up threads from spin_lock context
authorKashyap Desai <kashyap.desai@broadcom.com>
Fri, 9 Jun 2023 11:01:39 +0000 (04:01 -0700)
committerLeon Romanovsky <leon@kernel.org>
Mon, 12 Jun 2023 07:10:16 +0000 (10:10 +0300)
commit3099bcdc19b701f732f638ee45679858c08559bb
tree027e977eb899c25bc63a05b8fa5a2ccbf0606139
parent0af91306e17ef3d18e5f100aa58aa787869118af
RDMA/bnxt_re: Avoid calling wake_up threads from spin_lock context

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: 1ac5a4047975 ("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>
drivers/infiniband/hw/bnxt_re/qplib_rcfw.c