From: Greg Kroah-Hartman Date: Mon, 20 Feb 2017 12:33:37 +0000 (+0100) Subject: 4.9-stable patches X-Git-Tag: v4.4.51~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=51ab36ceb8ae2721a444bc09df07b25187d33bb1;p=thirdparty%2Fkernel%2Fstable-queue.git 4.9-stable patches added patches: ntb-ntb_perf-missing-dmaengine_unmap_put.patch ntb-ntb_transport-fix-debugfs_remove_recursive.patch ntb_transport-pick-an-unused-queue.patch --- diff --git a/queue-4.9/ntb-ntb_perf-missing-dmaengine_unmap_put.patch b/queue-4.9/ntb-ntb_perf-missing-dmaengine_unmap_put.patch new file mode 100644 index 00000000000..7ac5efe8b23 --- /dev/null +++ b/queue-4.9/ntb-ntb_perf-missing-dmaengine_unmap_put.patch @@ -0,0 +1,33 @@ +From 9644347c5240d0ee3ba7472ef332aaa4ff4db398 Mon Sep 17 00:00:00 2001 +From: Dave Jiang +Date: Mon, 30 Jan 2017 14:21:17 -0700 +Subject: ntb: ntb_perf missing dmaengine_unmap_put + +From: Dave Jiang + +commit 9644347c5240d0ee3ba7472ef332aaa4ff4db398 upstream. + +In the normal I/O execution path, ntb_perf is missing a call to +dmaengine_unmap_put() after submission. That causes us to leak +unmap objects. + +Signed-off-by: Dave Jiang +Fixes: 8a7b6a77 ("ntb: ntb perf tool") +Signed-off-by: Jon Mason +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/ntb/test/ntb_perf.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/ntb/test/ntb_perf.c ++++ b/drivers/ntb/test/ntb_perf.c +@@ -265,6 +265,8 @@ static ssize_t perf_copy(struct pthr_ctx + if (dma_submit_error(cookie)) + goto err_set_unmap; + ++ dmaengine_unmap_put(unmap); ++ + atomic_inc(&pctx->dma_sync); + dma_async_issue_pending(chan); + diff --git a/queue-4.9/ntb-ntb_transport-fix-debugfs_remove_recursive.patch b/queue-4.9/ntb-ntb_transport-fix-debugfs_remove_recursive.patch new file mode 100644 index 00000000000..d8eef0a5347 --- /dev/null +++ b/queue-4.9/ntb-ntb_transport-fix-debugfs_remove_recursive.patch @@ -0,0 +1,38 @@ +From dd62245e73de9138333cb0e7a42c8bc1215c3ce6 Mon Sep 17 00:00:00 2001 +From: Allen Hubbe +Date: Tue, 27 Dec 2016 17:57:04 -0500 +Subject: NTB: ntb_transport: fix debugfs_remove_recursive + +From: Allen Hubbe + +commit dd62245e73de9138333cb0e7a42c8bc1215c3ce6 upstream. + +The call to debugfs_remove_recursive(qp->debugfs_dir) of the sub-level +directory must not be later than +debugfs_remove_recursive(nt_debugfs_dir) of the top-level directory. +Otherwise, the sub-level directory will not exist, and it would be +invalid (panic) to attempt to remove it. This removes the top-level +directory last, after sub-level directories have been cleaned up. + +Signed-off-by: Allen Hubbe +Fixes: e26a5843f ("NTB: Split ntb_hw_intel and ntb_transport drivers") +Signed-off-by: Jon Mason +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/ntb/ntb_transport.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +--- a/drivers/ntb/ntb_transport.c ++++ b/drivers/ntb/ntb_transport.c +@@ -2270,9 +2270,8 @@ module_init(ntb_transport_init); + + static void __exit ntb_transport_exit(void) + { +- debugfs_remove_recursive(nt_debugfs_dir); +- + ntb_unregister_client(&ntb_transport_client); + bus_unregister(&ntb_transport_bus); ++ debugfs_remove_recursive(nt_debugfs_dir); + } + module_exit(ntb_transport_exit); diff --git a/queue-4.9/ntb_transport-pick-an-unused-queue.patch b/queue-4.9/ntb_transport-pick-an-unused-queue.patch new file mode 100644 index 00000000000..edd05f94bd2 --- /dev/null +++ b/queue-4.9/ntb_transport-pick-an-unused-queue.patch @@ -0,0 +1,34 @@ +From 8fcd0950c021d7be8493280541332b924b9de962 Mon Sep 17 00:00:00 2001 +From: Thomas VanSelus +Date: Mon, 13 Feb 2017 16:46:26 -0600 +Subject: ntb_transport: Pick an unused queue + +From: Thomas VanSelus + +commit 8fcd0950c021d7be8493280541332b924b9de962 upstream. + +Fix typo causing ntb_transport_create_queue to select the first +queue every time, instead of using the next free queue. + +Signed-off-by: Thomas VanSelus +Signed-off-by: Aaron Sierra +Acked-by: Allen Hubbe +Fixes: fce8a7bb5 ("PCI-Express Non-Transparent Bridge Support") +Signed-off-by: Jon Mason +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/ntb/ntb_transport.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/ntb/ntb_transport.c ++++ b/drivers/ntb/ntb_transport.c +@@ -1799,7 +1799,7 @@ ntb_transport_create_queue(void *data, s + + node = dev_to_node(&ndev->dev); + +- free_queue = ffs(nt->qp_bitmap); ++ free_queue = ffs(nt->qp_bitmap_free); + if (!free_queue) + goto err; + diff --git a/queue-4.9/series b/queue-4.9/series index d53ca27b995..ab96a07b325 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -15,3 +15,6 @@ revert-i2c-designware-detect-when-dynamic-tar-update-is-possible.patch pci-pme-restore-pcie_pme_driver.remove.patch printk-use-rcuidle-console-tracepoint.patch timekeeping-use-deferred-printk-in-debug-code.patch +ntb-ntb_transport-fix-debugfs_remove_recursive.patch +ntb-ntb_perf-missing-dmaengine_unmap_put.patch +ntb_transport-pick-an-unused-queue.patch