From 89ff16edd4c0bdb8e162d279c3b7c33f13d7966c Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 20 Feb 2017 13:33:09 +0100 Subject: [PATCH] 4.4-stable patches added patches: ntb-ntb_transport-fix-debugfs_remove_recursive.patch ntb_transport-pick-an-unused-queue.patch --- ...ansport-fix-debugfs_remove_recursive.patch | 38 +++++++++++++++++++ .../ntb_transport-pick-an-unused-queue.patch | 34 +++++++++++++++++ queue-4.4/series | 2 + 3 files changed, 74 insertions(+) create mode 100644 queue-4.4/ntb-ntb_transport-fix-debugfs_remove_recursive.patch create mode 100644 queue-4.4/ntb_transport-pick-an-unused-queue.patch diff --git a/queue-4.4/ntb-ntb_transport-fix-debugfs_remove_recursive.patch b/queue-4.4/ntb-ntb_transport-fix-debugfs_remove_recursive.patch new file mode 100644 index 00000000000..8fa7dd1ff4c --- /dev/null +++ b/queue-4.4/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 +@@ -2082,9 +2082,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.4/ntb_transport-pick-an-unused-queue.patch b/queue-4.4/ntb_transport-pick-an-unused-queue.patch new file mode 100644 index 00000000000..5187fa88327 --- /dev/null +++ b/queue-4.4/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 +@@ -1623,7 +1623,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.4/series b/queue-4.4/series index 7458ba0e606..1f2a77c427e 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -10,3 +10,5 @@ drm-dp-mst-fix-kernel-oops-when-turning-off-secondary-monitor.patch futex-move-futex_init-to-core_initcall.patch arm-8658-1-uaccess-fix-zeroing-of-64-bit-get_user.patch printk-use-rcuidle-console-tracepoint.patch +ntb-ntb_transport-fix-debugfs_remove_recursive.patch +ntb_transport-pick-an-unused-queue.patch -- 2.47.3