linux-stable/drivers/infiniband/sw/rxe
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
..
Kconfig RDMA/rxe: Fix missing kconfig dependency on CRYPTO 2021-03-01 14:46:31 -04:00
Makefile RDMA/rxe: Delete deprecated module parameters interface 2022-01-05 15:18:47 -04:00
rxe.c RDMA: Split kernel-only global device caps from uverbs device caps 2022-04-06 15:02:13 -03:00
rxe.h RDMA/rxe: Delete useless module.h include 2022-01-28 13:03:13 -04:00
rxe_av.c RDMA/rxe: Use standard names for ref counting 2022-03-16 10:34:42 -03:00
rxe_comp.c RDMA/rxe: Split qp state for requester and completer 2022-08-02 13:53:36 -03:00
rxe_cq.c RDMA/rxe: Convert pr_warn/err to pr_debug in pyverbs 2022-06-30 20:45:00 -03:00
rxe_hdr.h RDMA/rxe: Remove unused pkt->offset 2021-02-16 14:42:59 -04:00
rxe_hw_counters.c RDMA/counter: Add a descriptor in struct rdma_hw_stats 2021-10-12 12:48:04 -03:00
rxe_hw_counters.h RDMA: Split the alloc_hw_stats() ops to port and device variants 2021-06-16 20:58:29 -03:00
rxe_icrc.c RDMA/rxe: Fix types in rxe_icrc.c 2021-07-16 12:43:35 -03:00
rxe_loc.h Revert "RDMA/rxe: Create duplicate mapping tables for FMRs" 2022-07-27 12:22:57 +03:00
rxe_mcast.c RDMA/rxe: Fix an error handling path in rxe_get_mcg() 2022-05-24 12:55:12 -03:00
rxe_mmap.c RDMA/rxe: Delete useless module.h include 2022-01-28 13:03:13 -04:00
rxe_mr.c Revert "RDMA/rxe: Create duplicate mapping tables for FMRs" 2022-07-27 12:22:57 +03:00
rxe_mw.c Revert "RDMA/rxe: Create duplicate mapping tables for FMRs" 2022-07-27 12:22:57 +03:00
rxe_net.c RDMA/rxe: Use standard names for ref counting 2022-03-16 10:34:42 -03:00
rxe_net.h RDMA/rxe: Add SPDX hdrs to rxe source files 2020-08-31 12:20:02 -03:00
rxe_opcode.c RDMA/rxe: Remove support for SMI QPs from rdma_rxe 2022-04-08 14:38:33 -03:00
rxe_opcode.h RDMA/rxe: Remove unused WR_READ_WRITE_OR_SEND_MASK 2021-09-28 11:42:24 -03:00
rxe_param.h RDMA/rxe: Limit the number of calls to each tasklet 2022-07-22 17:43:00 -03:00
rxe_pool.c RDMA/rxe: Convert read side locking to rcu 2022-06-30 10:56:05 -03:00
rxe_pool.h RDMA/rxe: Stop lookup of partially built objects 2022-06-30 10:56:01 -03:00
rxe_qp.c RDMA/rxe: Fix error unwind in rxe_create_qp() 2022-08-02 14:29:41 -03:00
rxe_queue.c RDMA/rxe: Revert changes from irqsave to bh locks 2022-02-16 11:51:28 -04:00
rxe_queue.h RDMA/rxe: Replace include statement 2022-06-30 20:45:00 -03:00
rxe_recv.c RDMA/rxe: Remove support for SMI QPs from rdma_rxe 2022-04-08 14:38:33 -03:00
rxe_req.c RDMA/rxe: Split qp state for requester and completer 2022-08-02 13:53:36 -03:00
rxe_resp.c RDMA/rxe: Make the tasklet exits the same 2022-07-22 17:43:00 -03:00
rxe_srq.c RDMA/rxe: Add rxe_srq_cleanup() 2022-05-09 09:03:39 -03:00
rxe_task.c RDMA/rxe: Limit the number of calls to each tasklet 2022-07-22 17:43:00 -03:00
rxe_task.h RDMA/rxe: Convert tasklets to use new tasklet_setup() API 2020-09-03 12:01:53 -03:00
rxe_verbs.c Revert "RDMA/rxe: Create duplicate mapping tables for FMRs" 2022-07-27 12:22:57 +03:00
rxe_verbs.h RDMA/rxe: Split qp state for requester and completer 2022-08-02 13:53:36 -03:00