]> git.baikalelectronics.ru Git - kernel.git/commit
IB/mlx5: Fix NULL deference on mlx5_ib_update_xlt failure
authorIlya Lesokhin <ilyal@mellanox.com>
Sun, 24 Sep 2017 18:46:35 +0000 (21:46 +0300)
committerDoug Ledford <dledford@redhat.com>
Mon, 25 Sep 2017 15:47:24 +0000 (11:47 -0400)
commit46224b58d8bcfe0c577cbc3db9b6aa1ef9f6f649
tree4e96b51fe57c888f867eb0285af6383a1ac9d180
parentdf01a35ad642ed878eaf01a9f9ed3b44bf146b3e
IB/mlx5: Fix NULL deference on mlx5_ib_update_xlt failure

mlx5_ib_reg_user_mr called mlx5_ib_dereg_mr in case of MR population
failure. This resulted in a NULL dereference as ibmr->device wasn't
initialized yet.

We address this by adding an internal dereg_mr function that can handle
partially initialized MRs, and fixing clean_mr to work on partially
initialized MRs.

Fixes: bf15057beec0 ("IB/mlx5: Decouple MR allocation and population flows")
Signed-off-by: Ilya Lesokhin <ilyal@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/mlx5/mr.c