linux/drivers/infiniband/hw/mlx5
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
..
Kconfig net/mlx5: Extend mlx5_core to support ConnectX-4 Ethernet functionality 2015-05-30 18:24:51 -07:00
Makefile IB/mlx5: Add debug control parameters for congestion control 2017-07-24 10:34:28 -04:00
ah.c IB: Let ib_core resolve destination mac address 2017-10-18 12:10:36 -04:00
cmd.c IB/mlx5: Fix congestion counters in LAG mode 2017-12-21 16:06:07 -07:00
cmd.h IB/mlx5: Fix congestion counters in LAG mode 2017-12-21 16:06:07 -07:00
cong.c IB/mlx5: Add debug control parameters for congestion control 2017-07-24 10:34:28 -04:00
cq.c IB/mlx5: Exposing modify CQ callback to uverbs layer 2017-11-13 16:59:22 -05:00
doorbell.c IB/mlx5: Fix Mellanox copyright note 2015-04-02 16:33:42 -04:00
gsi.c IB/mlx5: Fix iteration overrun in GSI qps 2016-08-02 14:32:51 -04:00
ib_virt.c IB/mlx5: Restore IB guid/policy for virtual functions 2017-07-24 10:34:28 -04:00
mad.c IB/mlx5: Fix some spelling mistakes 2017-08-24 16:27:11 -04:00
main.c IB/mlx5: Serialize access to the VMA list 2017-12-27 15:24:40 -07:00
mem.c IB/mlx5: Simplify mlx5_ib_cont_pages 2017-09-25 11:47:24 -04:00
mlx5_ib.h IB/mlx5: Serialize access to the VMA list 2017-12-27 15:24:40 -07:00
mr.c IB/mlx5: Fix mlx5_ib_alloc_mr error flow 2017-12-27 15:24:41 -07:00
odp.c IB/mlx5: Use ARRAY_SIZE 2017-10-18 12:16:14 -04:00
qp.c IB/mlx5: Fix RoCE Address Path fields 2017-11-13 13:53:22 -05:00
srq.c IB/mlx5: Support IB_SRQT_TM 2017-08-29 08:30:20 -04:00