]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
RDMA/rxe: Fix unsafe drain work queue code
authorBob Pearson <rpearsonhpe@gmail.com>
Tue, 20 Jun 2023 13:55:21 +0000 (08:55 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Sep 2023 07:48:28 +0000 (09:48 +0200)
commitda572f6313aeead1f79e0810666bd8d8ffc794d4
tree1d9c24b9a395d025accedc498d9587619168a74c
parentecd4ff7e934b9c9e7782b07c58147bb3f4d0b2c1
RDMA/rxe: Fix unsafe drain work queue code

[ Upstream commit 5993b75d0bc71cd2b441d174b028fc36180f032c ]

If create_qp does not fully succeed it is possible for qp cleanup
code to attempt to drain the send or recv work queues before the
queues have been created causing a seg fault. This patch checks
to see if the queues exist before attempting to drain them.

Link: https://lore.kernel.org/r/20230620135519.9365-3-rpearsonhpe@gmail.com
Reported-by: syzbot+2da1965168e7dbcba136@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/linux-rdma/00000000000012d89205fe7cfe00@google.com/raw
Fixes: 49dc9c1f0c7e ("RDMA/rxe: Cleanup reset state handling in rxe_resp.c")
Fixes: fbdeb828a21f ("RDMA/rxe: Cleanup error state handling in rxe_comp.c")
Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/sw/rxe/rxe_comp.c
drivers/infiniband/sw/rxe/rxe_resp.c