]> git.baikalelectronics.ru Git - kernel.git/commit
IB/mlx5: Don't clean uninitialized UMR resources
authorMark Bloch <markb@mellanox.com>
Tue, 20 Mar 2018 13:45:37 +0000 (15:45 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Wed, 21 Mar 2018 20:22:22 +0000 (14:22 -0600)
commitd39d3db7651757c39cec53142489b1974904297b
treeabfd68e23a43524f34597a6694956c1083f020a5
parentcfac11184c3e73badfda0fe944fa2c8d46321d1c
IB/mlx5: Don't clean uninitialized UMR resources

In case we failed to create UMR resources, mark them as invalid so we
won't try to destroy them on the unwind path.

Add the relevant checks to destroy_umrc_res(), this is done for the
unlikely event ib_register_device() or create_umr_res() err out and we
try to destroy invalid objects.

Fixes: 3dab53e8048c ("IB/mlx5: Fix cleanup order on unload")
Signed-off-by: Mark Bloch <markb@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/mlx5/main.c
drivers/infiniband/hw/mlx5/mr.c