linux/drivers/infiniband/hw
Leon Romanovsky 67851c9381 IB/mlx4: Fix mlx4_ib_alloc_mr error flow
[ Upstream commit 5a371cf87e ]

ibmr.device is being set only after ib_alloc_mr() is successfully complete.
Therefore, in case imlx4_mr_enable() returns with error, the error flow
unwinder calls to mlx4_free_priv_pages(), which uses ibmr.device.

Such usage causes to NULL dereference oops and to fix it, the IB device
should be set in the mr struct earlier stage (e.g. prior to calling
mlx4_free_priv_pages()).

Fixes: 1b2cd0fc67 ("IB/mlx4: Support the new memory registration API")
Signed-off-by: Nitzan Carmi <nitzanc@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2018-03-03 10:24:32 +01:00
..
bnxt_re bnxt_re: changing the ip address shouldn't affect new connections 2017-12-14 09:53:14 +01:00
cxgb3 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
cxgb4 iw_cxgb4: when flushing, complete all wrs in a chain 2018-01-17 09:45:19 +01:00
hfi1 IB/hfi1: Initialize bth1 in 16B rc ack builder 2018-02-25 11:07:56 +01:00
hns RDMA/hns: Avoid NULL pointer exception 2017-12-25 14:26:30 +01:00
i40iw i40iw: Correct ARP index mask 2018-02-25 11:07:57 +01:00
mlx4 IB/mlx4: Fix mlx4_ib_alloc_mr error flow 2018-03-03 10:24:32 +01:00
mlx5 IB/mlx5: Fix mlx5_ib_alloc_mr error flow 2018-03-03 10:24:31 +01:00
mthca License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
nes IB: Correct MR length field to be 64-bit 2017-09-25 11:47:23 -04:00
ocrdma IB/ocrdma: fix incorrect fall-through on switch statement 2017-09-22 13:16:00 -04:00
qedr RDMA/qedr: Parse vlan priority as sl 2017-10-04 15:18:18 -04:00
qib IB/qib: Fix comparison error with qperf compare/swap test 2018-02-22 15:42:14 +01:00
usnic License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
vmw_pvrdma RDMA/vmw_pvrdma: Call ib_umem_release on destroy QP path 2018-03-03 10:24:29 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00