diff options
author | Zhu Yanjun <yanjun.zhu@linux.dev> | 2022-07-31 02:36:21 -0400 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2022-08-02 14:29:41 -0300 |
commit | fd5382c5805c4bcb50fd25b7246247d3f7114733 (patch) | |
tree | 6559c647787e18797d781bb87e08771c570f515b /drivers/infiniband/ulp | |
parent | c9776457bd5eaad4ce4ecb17af8d8f3cc6957c0b (diff) | |
download | linux-stable-fd5382c5805c4bcb50fd25b7246247d3f7114733.tar.gz linux-stable-fd5382c5805c4bcb50fd25b7246247d3f7114733.tar.bz2 linux-stable-fd5382c5805c4bcb50fd25b7246247d3f7114733.zip |
RDMA/rxe: Fix error unwind in rxe_create_qp()
In the function rxe_create_qp(), rxe_qp_from_init() is called to
initialize qp, internally things like the spin locks are not setup until
rxe_qp_init_req().
If an error occures before this point then the unwind will call
rxe_cleanup() and eventually to rxe_qp_do_cleanup()/rxe_cleanup_task()
which will oops when trying to access the uninitialized spinlock.
Move the spinlock initializations earlier before any failures.
Fixes: 8700e3e7c485 ("Soft RoCE driver")
Link: https://lore.kernel.org/r/20220731063621.298405-1-yanjun.zhu@linux.dev
Reported-by: syzbot+833061116fa28df97f3b@syzkaller.appspotmail.com
Signed-off-by: Zhu Yanjun <yanjun.zhu@linux.dev>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/infiniband/ulp')
0 files changed, 0 insertions, 0 deletions