]> git.baikalelectronics.ru Git - kernel.git/commit
IB/hfi1: Fix abba locking issue with sc_disable()
authorMike Marciniszyn <mike.marciniszyn@cornelisnetworks.com>
Wed, 13 Oct 2021 14:18:52 +0000 (10:18 -0400)
committerJason Gunthorpe <jgg@nvidia.com>
Wed, 13 Oct 2021 16:33:22 +0000 (13:33 -0300)
commitf40c9ea47ce1a81dc3c80c7ccb54a46a78ea8c80
tree81a785ac857883315c21f69a87fca1b1761314a5
parente70a18cde33f601d461db0abaa43f4be50b90448
IB/hfi1: Fix abba locking issue with sc_disable()

sc_disable() after having disabled the send context wakes up any waiters
by calling hfi1_qp_wakeup() while holding the waitlock for the sc.

This is contrary to the model for all other calls to hfi1_qp_wakeup()
where the waitlock is dropped and a local is used to drive calls to
hfi1_qp_wakeup().

Fix by moving the sc->piowait into a local list and driving the wakeup
calls from the list.

Fixes: a65cb59f9e8d ("IB/hfi1: Handle wakeup of orphaned QPs for pio")
Link: https://lore.kernel.org/r/20211013141852.128104.2682.stgit@awfm-01.cornelisnetworks.com
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@cornelisnetworks.com>
Reported-by: TOTE Robot <oslab@tsinghua.edu.cn>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@cornelisnetworks.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/hfi1/pio.c