[SRU][Bionic][PATCH 0/2] Fixes for LP:1764982

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[SRU][Bionic][PATCH 0/2] Fixes for LP:1764982

Joseph Salisbury-3
== SRU Justification ==
This bug causes the machine to get stuck and bonding to not work when
the nvmet_rdma module is loaded.

Both of these commits are in mainline as of v4.17-rc1.

== Fixes ==
a3dd7d0022c3 ("nvmet-rdma: Don't flush system_wq by default during remove_one")
9bad0404ecd7 ("nvme-rdma: Don't flush delete_wq by default during remove_one")

== Regression Potential ==
Low.  Limited to nvme driver and tested by Mellanox.

== Test Case ==
A test kernel was built with these patches and tested by the original bug reporter.
The bug reporter states the test kernel resolved the bug.

Max Gurtovoy (2):
  nvmet-rdma: Don't flush system_wq by default during remove_one
  nvme-rdma: Don't flush delete_wq by default during remove_one

 drivers/nvme/host/rdma.c   | 14 ++++++++++++++
 drivers/nvme/target/rdma.c | 19 ++++++++++++++++++-
 2 files changed, 32 insertions(+), 1 deletion(-)

--
2.7.4


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[SRU][Bionic][PATCH 1/2] nvmet-rdma: Don't flush system_wq by default during remove_one

Joseph Salisbury-3
From: Max Gurtovoy <[hidden email]>

BugLink: http://bugs.launchpad.net/bugs/1764982

The .remove_one function is called for any ib_device removal.
In case the removed device has no reference in our driver, there
is no need to flush the system work queue.

Reviewed-by: Israel Rukshin <[hidden email]>
Signed-off-by: Max Gurtovoy <[hidden email]>
Reviewed-by: Sagi Grimberg <[hidden email]>
Signed-off-by: Keith Busch <[hidden email]>
Signed-off-by: Jens Axboe <[hidden email]>
(cherry picked from commit a3dd7d0022c347207ae931c753a6dc3e6e8fcbc1)
Signed-off-by: Joseph Salisbury <[hidden email]>
---
 drivers/nvme/target/rdma.c | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/drivers/nvme/target/rdma.c b/drivers/nvme/target/rdma.c
index 4991290..f529e2a 100644
--- a/drivers/nvme/target/rdma.c
+++ b/drivers/nvme/target/rdma.c
@@ -1515,8 +1515,25 @@ static struct nvmet_fabrics_ops nvmet_rdma_ops = {
 static void nvmet_rdma_remove_one(struct ib_device *ib_device, void *client_data)
 {
  struct nvmet_rdma_queue *queue, *tmp;
+ struct nvmet_rdma_device *ndev;
+ bool found = false;
+
+ mutex_lock(&device_list_mutex);
+ list_for_each_entry(ndev, &device_list, entry) {
+ if (ndev->device == ib_device) {
+ found = true;
+ break;
+ }
+ }
+ mutex_unlock(&device_list_mutex);
+
+ if (!found)
+ return;
 
- /* Device is being removed, delete all queues using this device */
+ /*
+ * IB Device that is used by nvmet controllers is being removed,
+ * delete all queues using this device.
+ */
  mutex_lock(&nvmet_rdma_queue_mutex);
  list_for_each_entry_safe(queue, tmp, &nvmet_rdma_queue_list,
  queue_list) {
--
2.7.4


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[SRU][Bionic][PATCH 2/2] nvme-rdma: Don't flush delete_wq by default during remove_one

Joseph Salisbury-3
In reply to this post by Joseph Salisbury-3
From: Max Gurtovoy <[hidden email]>

BugLink: http://bugs.launchpad.net/bugs/1764982

The .remove_one function is called for any ib_device removal.
In case the removed device has no reference in our driver, there
is no need to flush the work queue.

Reviewed-by: Israel Rukshin <[hidden email]>
Signed-off-by: Max Gurtovoy <[hidden email]>
Reviewed-by: Sagi Grimberg <[hidden email]>
Signed-off-by: Keith Busch <[hidden email]>
Signed-off-by: Jens Axboe <[hidden email]>
(cherry picked from commit 9bad0404ecd7594265cef04e176adeaa4ffbca4a)
Signed-off-by: Joseph Salisbury <[hidden email]>
---
 drivers/nvme/host/rdma.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c
index 2a0bba7..65cfa6c 100644
--- a/drivers/nvme/host/rdma.c
+++ b/drivers/nvme/host/rdma.c
@@ -2027,6 +2027,20 @@ static struct nvmf_transport_ops nvme_rdma_transport = {
 static void nvme_rdma_remove_one(struct ib_device *ib_device, void *client_data)
 {
  struct nvme_rdma_ctrl *ctrl;
+ struct nvme_rdma_device *ndev;
+ bool found = false;
+
+ mutex_lock(&device_list_mutex);
+ list_for_each_entry(ndev, &device_list, entry) {
+ if (ndev->dev == ib_device) {
+ found = true;
+ break;
+ }
+ }
+ mutex_unlock(&device_list_mutex);
+
+ if (!found)
+ return;
 
  /* Delete all controllers using this device */
  mutex_lock(&nvme_rdma_ctrl_mutex);
--
2.7.4


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

ACK: [SRU][Bionic][PATCH 0/2] Fixes for LP:1764982

Kleber Souza
In reply to this post by Joseph Salisbury-3
On 05/07/18 23:32, Joseph Salisbury wrote:

> == SRU Justification ==
> This bug causes the machine to get stuck and bonding to not work when
> the nvmet_rdma module is loaded.
>
> Both of these commits are in mainline as of v4.17-rc1.
>
> == Fixes ==
> a3dd7d0022c3 ("nvmet-rdma: Don't flush system_wq by default during remove_one")
> 9bad0404ecd7 ("nvme-rdma: Don't flush delete_wq by default during remove_one")
>
> == Regression Potential ==
> Low.  Limited to nvme driver and tested by Mellanox.
>
> == Test Case ==
> A test kernel was built with these patches and tested by the original bug reporter.
> The bug reporter states the test kernel resolved the bug.
>
> Max Gurtovoy (2):
>   nvmet-rdma: Don't flush system_wq by default during remove_one
>   nvme-rdma: Don't flush delete_wq by default during remove_one
>
>  drivers/nvme/host/rdma.c   | 14 ++++++++++++++
>  drivers/nvme/target/rdma.c | 19 ++++++++++++++++++-
>  2 files changed, 32 insertions(+), 1 deletion(-)
>

Acked-by: Kleber Sacilotto de Souza <[hidden email]>

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team