aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/i40iw
diff options
context:
space:
mode:
authorNitzan Carmi <nitzanc@mellanox.com>2017-12-26 11:20:20 +0200
committerJason Gunthorpe <jgg@mellanox.com>2017-12-27 15:24:41 -0700
commit45e6ae7ef21b907dacb18da62d5787d74a31d860 (patch)
treedd45067d1c1a85ae3061f2f86c98b9f96469e8c4 /drivers/infiniband/hw/i40iw
parentIB/core: Verify that QP is security enabled in create and destroy (diff)
downloadlinux-dev-45e6ae7ef21b907dacb18da62d5787d74a31d860.tar.xz
linux-dev-45e6ae7ef21b907dacb18da62d5787d74a31d860.zip
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: 8a187ee52b04 ("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>
Diffstat (limited to 'drivers/infiniband/hw/i40iw')
0 files changed, 0 insertions, 0 deletions