]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
drop revert-software-node-simplify-software_node_release-function.patch
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 Mar 2020 20:18:04 +0000 (21:18 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 Mar 2020 20:18:04 +0000 (21:18 +0100)
queue-5.4/revert-software-node-simplify-software_node_release-function.patch [deleted file]
queue-5.4/series
queue-5.5/revert-software-node-simplify-software_node_release-function.patch [deleted file]
queue-5.5/series

diff --git a/queue-5.4/revert-software-node-simplify-software_node_release-function.patch b/queue-5.4/revert-software-node-simplify-software_node_release-function.patch
deleted file mode 100644 (file)
index b9bd91a..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-From 7589238a8cf37331607c3222a64ac3140b29532d Mon Sep 17 00:00:00 2001
-From: Brendan Higgins <brendanhiggins@google.com>
-Date: Thu, 27 Feb 2020 16:00:01 -0800
-Subject: Revert "software node: Simplify software_node_release() function"
-
-From: Brendan Higgins <brendanhiggins@google.com>
-
-commit 7589238a8cf37331607c3222a64ac3140b29532d upstream.
-
-This reverts commit 3df85a1ae51f6b256982fe9d17c2dc5bfb4cc402.
-
-The reverted commit says "It's possible to release the node ID
-immediately when fwnode_remove_software_node() is called, no need to
-wait for software_node_release() with that." However, releasing the node
-ID before waiting for software_node_release() to be called causes the
-node ID to be released before the kobject and the underlying sysfs
-entry; this means there is a period of time where a sysfs entry exists
-that is associated with an unallocated node ID.
-
-Once consequence of this is that there is a race condition where it is
-possible to call fwnode_create_software_node() with no parent node
-specified (NULL) and have it fail with -EEXIST because the node ID that
-was assigned is still associated with a stale sysfs entry that hasn't
-been cleaned up yet.
-
-Although it is difficult to reproduce this race condition under normal
-conditions, it can be deterministically reproduced with the following
-minconfig on UML:
-
-CONFIG_KUNIT_DRIVER_PE_TEST=y
-CONFIG_DEBUG_KERNEL=y
-CONFIG_DEBUG_OBJECTS=y
-CONFIG_DEBUG_OBJECTS_TIMERS=y
-CONFIG_DEBUG_KOBJECT_RELEASE=y
-CONFIG_KUNIT=y
-
-Running the tests with this configuration causes the following failure:
-
-<snip>
-kobject: 'node0' ((____ptrval____)): kobject_release, parent (____ptrval____) (delayed 400)
-       ok 1 - pe_test_uints
-sysfs: cannot create duplicate filename '/kernel/software_nodes/node0'
-CPU: 0 PID: 28 Comm: kunit_try_catch Not tainted 5.6.0-rc3-next-20200227 #14
-<snip>
-kobject_add_internal failed for node0 with -EEXIST, don't try to register things with the same name in the same directory.
-kobject: 'node0' ((____ptrval____)): kobject_release, parent (____ptrval____) (delayed 100)
-       # pe_test_uint_arrays: ASSERTION FAILED at drivers/base/test/property-entry-test.c:123
-       Expected node is not error, but is: -17
-       not ok 2 - pe_test_uint_arrays
-<snip>
-
-Reported-by: Heidi Fahim <heidifahim@google.com>
-Signed-off-by: Brendan Higgins <brendanhiggins@google.com>
-Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
-Cc: 5.3+ <stable@vger.kernel.org> # 5.3+
-Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
----
- drivers/base/swnode.c |   14 +++++++-------
- 1 file changed, 7 insertions(+), 7 deletions(-)
-
---- a/drivers/base/swnode.c
-+++ b/drivers/base/swnode.c
-@@ -679,6 +679,13 @@ static void software_node_release(struct
- {
-       struct swnode *swnode = kobj_to_swnode(kobj);
-+      if (swnode->parent) {
-+              ida_simple_remove(&swnode->parent->child_ids, swnode->id);
-+              list_del(&swnode->entry);
-+      } else {
-+              ida_simple_remove(&swnode_root_ids, swnode->id);
-+      }
-+
-       if (swnode->allocated) {
-               property_entries_free(swnode->node->properties);
-               kfree(swnode->node);
-@@ -844,13 +851,6 @@ void fwnode_remove_software_node(struct
-       if (!swnode)
-               return;
--      if (swnode->parent) {
--              ida_simple_remove(&swnode->parent->child_ids, swnode->id);
--              list_del(&swnode->entry);
--      } else {
--              ida_simple_remove(&swnode_root_ids, swnode->id);
--      }
--
-       kobject_put(&swnode->kobj);
- }
- EXPORT_SYMBOL_GPL(fwnode_remove_software_node);
index 4a3a823c81b0211a1e7a7631a58b9c9f862ef704..65d5ce0b437ba413d72f358965e83ac56561838b 100644 (file)
@@ -77,7 +77,6 @@ mm-numa-fix-bad-pmd-by-atomically-check-for-pmd_trans_huge-when-marking-page-tab
 mm-fix-possible-pmd-dirty-bit-lost-in-set_pmd_migration_entry.patch
 mm-hotplug-fix-page-online-with-debug_pagealloc-compiled-but-not-enabled.patch
 fat-fix-uninit-memory-access-for-partial-initialized-inode.patch
-revert-software-node-simplify-software_node_release-function.patch
 btrfs-fix-raid-direct-i-o-reads-with-alternate-csums.patch
 arm64-dts-socfpga-agilex-fix-gmac-compatible.patch
 arm-dts-dra76x-fix-mmc3-max-frequency.patch
diff --git a/queue-5.5/revert-software-node-simplify-software_node_release-function.patch b/queue-5.5/revert-software-node-simplify-software_node_release-function.patch
deleted file mode 100644 (file)
index 2a14e8e..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-From 7589238a8cf37331607c3222a64ac3140b29532d Mon Sep 17 00:00:00 2001
-From: Brendan Higgins <brendanhiggins@google.com>
-Date: Thu, 27 Feb 2020 16:00:01 -0800
-Subject: Revert "software node: Simplify software_node_release() function"
-
-From: Brendan Higgins <brendanhiggins@google.com>
-
-commit 7589238a8cf37331607c3222a64ac3140b29532d upstream.
-
-This reverts commit 3df85a1ae51f6b256982fe9d17c2dc5bfb4cc402.
-
-The reverted commit says "It's possible to release the node ID
-immediately when fwnode_remove_software_node() is called, no need to
-wait for software_node_release() with that." However, releasing the node
-ID before waiting for software_node_release() to be called causes the
-node ID to be released before the kobject and the underlying sysfs
-entry; this means there is a period of time where a sysfs entry exists
-that is associated with an unallocated node ID.
-
-Once consequence of this is that there is a race condition where it is
-possible to call fwnode_create_software_node() with no parent node
-specified (NULL) and have it fail with -EEXIST because the node ID that
-was assigned is still associated with a stale sysfs entry that hasn't
-been cleaned up yet.
-
-Although it is difficult to reproduce this race condition under normal
-conditions, it can be deterministically reproduced with the following
-minconfig on UML:
-
-CONFIG_KUNIT_DRIVER_PE_TEST=y
-CONFIG_DEBUG_KERNEL=y
-CONFIG_DEBUG_OBJECTS=y
-CONFIG_DEBUG_OBJECTS_TIMERS=y
-CONFIG_DEBUG_KOBJECT_RELEASE=y
-CONFIG_KUNIT=y
-
-Running the tests with this configuration causes the following failure:
-
-<snip>
-kobject: 'node0' ((____ptrval____)): kobject_release, parent (____ptrval____) (delayed 400)
-       ok 1 - pe_test_uints
-sysfs: cannot create duplicate filename '/kernel/software_nodes/node0'
-CPU: 0 PID: 28 Comm: kunit_try_catch Not tainted 5.6.0-rc3-next-20200227 #14
-<snip>
-kobject_add_internal failed for node0 with -EEXIST, don't try to register things with the same name in the same directory.
-kobject: 'node0' ((____ptrval____)): kobject_release, parent (____ptrval____) (delayed 100)
-       # pe_test_uint_arrays: ASSERTION FAILED at drivers/base/test/property-entry-test.c:123
-       Expected node is not error, but is: -17
-       not ok 2 - pe_test_uint_arrays
-<snip>
-
-Reported-by: Heidi Fahim <heidifahim@google.com>
-Signed-off-by: Brendan Higgins <brendanhiggins@google.com>
-Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
-Cc: 5.3+ <stable@vger.kernel.org> # 5.3+
-Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
----
- drivers/base/swnode.c |   14 +++++++-------
- 1 file changed, 7 insertions(+), 7 deletions(-)
-
---- a/drivers/base/swnode.c
-+++ b/drivers/base/swnode.c
-@@ -594,6 +594,13 @@ static void software_node_release(struct
- {
-       struct swnode *swnode = kobj_to_swnode(kobj);
-+      if (swnode->parent) {
-+              ida_simple_remove(&swnode->parent->child_ids, swnode->id);
-+              list_del(&swnode->entry);
-+      } else {
-+              ida_simple_remove(&swnode_root_ids, swnode->id);
-+      }
-+
-       if (swnode->allocated) {
-               property_entries_free(swnode->node->properties);
-               kfree(swnode->node);
-@@ -759,13 +766,6 @@ void fwnode_remove_software_node(struct
-       if (!swnode)
-               return;
--      if (swnode->parent) {
--              ida_simple_remove(&swnode->parent->child_ids, swnode->id);
--              list_del(&swnode->entry);
--      } else {
--              ida_simple_remove(&swnode_root_ids, swnode->id);
--      }
--
-       kobject_put(&swnode->kobj);
- }
- EXPORT_SYMBOL_GPL(fwnode_remove_software_node);
index 7ba0c74d00ce3207345ec47cf2007b37d2cfdc2d..2c67372b4d2d9d43adf73432da253c65e3bb6352 100644 (file)
@@ -82,7 +82,6 @@ mm-fix-possible-pmd-dirty-bit-lost-in-set_pmd_migration_entry.patch
 mm-avoid-data-corruption-on-cow-fault-into-pfn-mapped-vma.patch
 mm-hotplug-fix-page-online-with-debug_pagealloc-compiled-but-not-enabled.patch
 fat-fix-uninit-memory-access-for-partial-initialized-inode.patch
-revert-software-node-simplify-software_node_release-function.patch
 btrfs-fix-raid-direct-i-o-reads-with-alternate-csums.patch
 arm64-dts-socfpga-agilex-fix-gmac-compatible.patch
 arm-dts-dra76x-fix-mmc3-max-frequency.patch