]> www.infradead.org Git - users/jedix/linux-maple.git/commit
IB/mlx5: avoid destroying a NULL mr in reg_user_mr error flow
authorHaggai Eran <haggaie@mellanox.com>
Tue, 1 Sep 2015 06:56:56 +0000 (09:56 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Sep 2015 17:26:17 +0000 (19:26 +0200)
commit26783066148258ea62996c30d9c063dd193cb7a2
tree3030c31cb679304b5b6d29682e25693a42d04e6e
parent6465d5d793ecc69c78c1ad7da2e4bbd13de9f063
IB/mlx5: avoid destroying a NULL mr in reg_user_mr error flow

commit 11d748045c6dadb279d1acdb6d2ea8f3f2ede85b upstream.

The mlx5_ib_reg_user_mr() function will attempt to call clean_mr() in
its error flow even though there is never a case where the error flow
occurs with a valid MR pointer to destroy.

Remove the clean_mr() call and the incorrect comment above it.

Fixes: b4cfe447d47b ("IB/mlx5: Implement on demand paging by adding
support for MMU notifiers")
Cc: Eli Cohen <eli@mellanox.com>
Signed-off-by: Haggai Eran <haggaie@mellanox.com>
Reviewed-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/hw/mlx5/mr.c