android_kernel_motorola_sm6375/drivers/infiniband
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Lv Yunlong da5b49598a RDMA/bnxt_re: Fix a double free in bnxt_qplib_alloc_res
[ Upstream commit 34b39efa5ae82fc0ad0acc27653c12a56328dbbe ]

In bnxt_qplib_alloc_res, it calls bnxt_qplib_alloc_dpi_tbl().  Inside
bnxt_qplib_alloc_dpi_tbl, dpit->dbr_bar_reg_iomem is freed via
pci_iounmap() in unmap_io error branch. After the callee returns err code,
bnxt_qplib_alloc_res calls
bnxt_qplib_free_res()->bnxt_qplib_free_dpi_tbl() in the fail branch. Then
dpit->dbr_bar_reg_iomem is freed in the second time by pci_iounmap().

My patch set dpit->dbr_bar_reg_iomem to NULL after it is freed by
pci_iounmap() in the first time, to avoid the double free.

Fixes: 1ac5a40479 ("RDMA/bnxt_re: Add bnxt_re RoCE driver")
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Lv Yunlong <[email protected]>
Reviewed-by: Leon Romanovsky <[email protected]>
Acked-by: Devesh Sharma <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
2021-05-14 09:44:32 +02:00
..
core RDMA/addr: Be strict with gid size 2021-04-14 08:24:18 +02:00
hw RDMA/bnxt_re: Fix a double free in bnxt_qplib_alloc_res 2021-05-14 09:44:32 +02:00
sw RDMA/siw: Fix a use after free in siw_alloc_mr 2021-05-14 09:44:32 +02:00
ulp RDMA/srpt: Fix error return code in srpt_cm_req_recv() 2021-05-14 09:44:28 +02:00
Kconfig RMDA/sw: Don't allow drivers using dma_virt_ops on highmem configs 2020-11-24 13:29:05 +01:00
Makefile