linux/drivers/infiniband/sw
Zhu Yanjun fd5382c580 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: 8700e3e7c4 ("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>
2022-08-02 14:29:41 -03:00
..
rdmavt Linux 5.18 2022-05-24 12:40:28 -03:00
rxe RDMA/rxe: Fix error unwind in rxe_create_qp() 2022-08-02 14:29:41 -03:00
siw RDMA/siw: Fix duplicated reported IW_CM_EVENT_CONNECT_REPLY event 2022-07-18 14:20:52 +03:00
Makefile rdma/siw: addition to kernel build environment 2019-07-02 17:03:41 -03:00