]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
RDMA/rxe: Fix double unlock in rxe_qp.c
authorBob Pearson <rpearsonhpe@gmail.com>
Mon, 15 May 2023 20:10:57 +0000 (15:10 -0500)
committerJason Gunthorpe <jgg@nvidia.com>
Tue, 16 May 2023 19:52:45 +0000 (16:52 -0300)
commit17eabd6a044b57b2c1b5459eb9d11af3ea909e63
tree39775cb75fe486c1569d5d0a35fe42194bc56a2e
parent78b6a9a3f445e121ca08195084206cb8faa6999f
RDMA/rxe: Fix double unlock in rxe_qp.c

A recent patch can cause a double spin_unlock_bh() in rxe_qp_to_attr() at
line 715 in rxe_qp.c. Move the 2nd unlock into the if statement.

Fixes: f605f26ea196 ("RDMA/rxe: Protect QP state with qp->state_lock")
Link: https://lore.kernel.org/r/20230515201056.1591140-1-rpearsonhpe@gmail.com
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/r/27773078-40ce-414f-8b97-781954da9f25@kili.mountain
Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/sw/rxe/rxe_qp.c