tmp_suning_uos_patched/drivers/infiniband/hw
Douglas Miller 5f54364ff6 RDMA/hfi1: Fix use-after-free bug for mm struct
commit 2bbac98d0930e8161b1957dc0ec99de39ade1b3c upstream.

Under certain conditions, such as MPI_Abort, the hfi1 cleanup code may
represent the last reference held on the task mm.
hfi1_mmu_rb_unregister() then drops the last reference and the mm is freed
before the final use in hfi1_release_user_pages().  A new task may
allocate the mm structure while it is still being used, resulting in
problems. One manifestation is corruption of the mmap_sem counter leading
to a hang in down_write().  Another is corruption of an mm struct that is
in use by another task.

Fixes: 3d2a9d6425 ("IB/hfi1: Ensure correct mm is used at all times")
Link: https://lore.kernel.org/r/20220408133523.122165.72975.stgit@awfm-01.cornelisnetworks.com
Cc: <stable@vger.kernel.org>
Signed-off-by: Douglas Miller <doug.miller@cornelisnetworks.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@cornelisnetworks.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-13 21:01:08 +02:00
..
bnxt_re RDMA/bnxt_re: Scan the whole bitmap when checking if "disabling RCFW with pending cmd-bit" 2022-01-27 10:54:04 +01:00
cxgb4 RDMA/cxgb4: Set queue pair state when being queried 2022-01-27 10:54:09 +01:00
efa RDMA/efa: Remove double QP type assignment 2021-09-18 13:40:12 +02:00
hfi1 RDMA/hfi1: Fix use-after-free bug for mm struct 2022-04-13 21:01:08 +02:00
hns RDMA/hns: Modify the mapping attribute of doorbell to device 2022-01-27 10:54:30 +01:00
i40iw RDMA/i40iw: Fix error unwinding when i40iw_hmc_sd_one fails 2021-05-14 09:50:40 +02:00
mlx4 RDMA/mlx4: Don't continue event handler after memory allocation failure 2022-02-08 18:30:36 +01:00
mlx5 RDMA/mlx5: Don't remove cache MRs when a delay is needed 2022-04-13 21:01:05 +02:00
mthca RDMa/mthca: Work around -Wenum-conversion warning 2020-12-30 11:53:08 +01:00
ocrdma RDMA/ocrdma: Fix use after free in ocrdma_dealloc_ucontext_pd() 2021-01-19 18:27:21 +01:00
qedr RDMA/qedr: Fix reporting max_{send/recv}_wr attrs 2022-01-27 10:54:06 +01:00
qib IB/qib: Fix memory leak in qib_user_sdma_queue_pkts() 2021-12-29 12:25:55 +01:00
usnic treewide: Change list_sort to use const pointers 2021-09-30 10:11:04 +02:00
vmw_pvrdma RDMA/vmw_pvrdma: Fix network_hdr_type reported in WC 2021-01-30 13:55:18 +01:00
Makefile