[3.19.y-ckt stable] Patch "IB/mlx5: avoid destroying a NULL mr in reg_user_mr error flow" has been added to staging queue
Kamal Mostafa
kamal at canonical.com
Mon Oct 19 22:40:42 UTC 2015
This is a note to let you know that I have just added a patch titled
IB/mlx5: avoid destroying a NULL mr in reg_user_mr error flow
to the linux-3.19.y-queue branch of the 3.19.y-ckt extended stable tree
which can be found at:
http://kernel.ubuntu.com/git/ubuntu/linux.git/log/?h=linux-3.19.y-queue
This patch is scheduled to be released in version 3.19.8-ckt8.
If you, or anyone else, feels it should not be added to this tree, please
reply to this email.
For more information about the 3.19.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
Thanks.
-Kamal
------
>From fa9e5ae509cb31defe1ae5b7d23a886eb50516e5 Mon Sep 17 00:00:00 2001
From: Haggai Eran <haggaie at mellanox.com>
Date: Tue, 1 Sep 2015 09:56:56 +0300
Subject: 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 at mellanox.com>
Signed-off-by: Haggai Eran <haggaie at mellanox.com>
Reviewed-by: Sagi Grimberg <sagig at mellanox.com>
Signed-off-by: Doug Ledford <dledford at redhat.com>
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
drivers/infiniband/hw/mlx5/mr.c | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/drivers/infiniband/hw/mlx5/mr.c b/drivers/infiniband/hw/mlx5/mr.c
index 32a28bd..e8b669f 100644
--- a/drivers/infiniband/hw/mlx5/mr.c
+++ b/drivers/infiniband/hw/mlx5/mr.c
@@ -1118,19 +1118,7 @@ struct ib_mr *mlx5_ib_reg_user_mr(struct ib_pd *pd, u64 start, u64 length,
return &mr->ibmr;
error:
- /*
- * Destroy the umem *before* destroying the MR, to ensure we
- * will not have any in-flight notifiers when destroying the
- * MR.
- *
- * As the MR is completely invalid to begin with, and this
- * error path is only taken if we can't push the mr entry into
- * the pagefault tree, this is safe.
- */
-
ib_umem_release(umem);
- /* Kill the MR, and return an error code. */
- clean_mr(mr);
return ERR_PTR(err);
}
--
1.9.1
More information about the kernel-team
mailing list