OpenCloudOS-Kernel/drivers/infiniband/hw
Nitzan Carmi 45e6ae7ef2 IB/mlx5: Fix mlx5_ib_alloc_mr error flow
ibmr.device is being set only after ib_alloc_mr() is
(successfully) complete. Therefore, in case mlx5_core_create_mkey()
return with error, the error flow calls mlx5_free_priv_descs()
which uses ibmr.device (which doesn't exist yet), causing
a NULL dereference oops.

To fix this, the IB device should be set in the mr struct earlier
stage (e.g. prior to calling mlx5_core_create_mkey()).

Fixes: 8a187ee52b ("IB/mlx5: Support the new memory registration API")
Signed-off-by: Max Gurtovoy <maxg@mellanox.com>
Signed-off-by: Nitzan Carmi <nitzanc@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
2017-12-27 15:24:41 -07:00
..
bnxt_re Updates for 4.15 kernel merge window 2017-11-15 14:54:53 -08:00
cxgb3 Updates for 4.15 kernel merge window 2017-11-15 14:54:53 -08:00
cxgb4 iw_cxgb4: when flushing, complete all wrs in a chain 2017-12-21 16:06:06 -07:00
hfi1 IB/hfi: Only read capability registers if the capability exists 2017-12-22 10:42:08 -07:00
hns RDMA/hns: Get rid of page operation after dma_alloc_coherent 2017-12-01 12:21:27 -07:00
i40iw i40iw: Notify user of established connection after QP in RTS 2017-12-01 12:21:26 -07:00
mlx4 IB/mlx4: Fix RSS hash fields restrictions 2017-12-07 15:28:07 -05:00
mlx5 IB/mlx5: Fix mlx5_ib_alloc_mr error flow 2017-12-27 15:24:41 -07:00
mthca treewide: setup_timer() -> timer_setup() (2 field) 2017-11-21 15:57:09 -08:00
nes treewide: Remove TIMER_FUNC_TYPE and TIMER_DATA_TYPE casts 2017-11-21 16:35:54 -08:00
ocrdma IB/ocrdma_hw: remove unnecessary code in ocrdma_mbx_dealloc_lkey 2017-11-13 16:18:33 -05:00
qedr Updates for 4.15 kernel merge window 2017-11-15 14:54:53 -08:00
qib Merge branch 'akpm' (patches from Andrew) 2017-11-15 19:42:40 -08:00
usnic Updates for 4.15 kernel merge window 2017-11-15 14:54:53 -08:00
vmw_pvrdma RDMA/vmw_pvrdma: Avoid use after free due to QP/CQ/SRQ destroy 2017-12-21 16:06:07 -07:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00