diff options
author | Salvatore Bonaccorso <carnil@debian.org> | 2019-12-18 18:06:31 +0100 |
---|---|---|
committer | Salvatore Bonaccorso <carnil@debian.org> | 2019-12-18 22:50:21 +0100 |
commit | 102987a83771aa994821d4d982d06faa64c789e4 (patch) | |
tree | 3e5ab5206886ec297a1a97ce80f504d75468ed2f /debian/patches-rt/workqueue-Convert-for_each_wq-to-use-built-in-list-c.patch | |
parent | 479cb120ecb2b3f2c4d929a7b57860248d6f79bd (diff) | |
download | linux-debian-102987a83771aa994821d4d982d06faa64c789e4.tar.gz |
[rt] Update to 5.4.3-rt1 and re-enable
Adjust for context changes due to backport of
e66b39af00f4 ("workqueue: Fix pwq ref leak in rescuer_thread()") and
def98c84b6cd ("workqueue: Fix spurious sanity check failures in
destroy_workqueue()") in 5.4.4.
Diffstat (limited to 'debian/patches-rt/workqueue-Convert-for_each_wq-to-use-built-in-list-c.patch')
-rw-r--r-- | debian/patches-rt/workqueue-Convert-for_each_wq-to-use-built-in-list-c.patch | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/debian/patches-rt/workqueue-Convert-for_each_wq-to-use-built-in-list-c.patch b/debian/patches-rt/workqueue-Convert-for_each_wq-to-use-built-in-list-c.patch new file mode 100644 index 000000000..ce3c1cfa8 --- /dev/null +++ b/debian/patches-rt/workqueue-Convert-for_each_wq-to-use-built-in-list-c.patch @@ -0,0 +1,46 @@ +From: "Joel Fernandes (Google)" <joel@joelfernandes.org> +Date: Thu, 15 Aug 2019 10:18:42 -0400 +Subject: [PATCH] workqueue: Convert for_each_wq to use built-in list check +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz + +Because list_for_each_entry_rcu() can now check for holding a +lock as well as for being in an RCU read-side critical section, +this commit replaces the workqueue_sysfs_unregister() function's +use of assert_rcu_or_wq_mutex() and list_for_each_entry_rcu() with +list_for_each_entry_rcu() augmented with a lockdep_is_held() optional +argument. + +Acked-by: Tejun Heo <tj@kernel.org> +Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org> +Signed-off-by: Paul E. McKenney <paulmck@kernel.org> +Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +--- + kernel/workqueue.c | 10 ++-------- + 1 file changed, 2 insertions(+), 8 deletions(-) + +--- a/kernel/workqueue.c ++++ b/kernel/workqueue.c +@@ -364,11 +364,6 @@ static void workqueue_sysfs_unregister(s + !lockdep_is_held(&wq_pool_mutex), \ + "RCU or wq_pool_mutex should be held") + +-#define assert_rcu_or_wq_mutex(wq) \ +- RCU_LOCKDEP_WARN(!rcu_read_lock_held() && \ +- !lockdep_is_held(&wq->mutex), \ +- "RCU or wq->mutex should be held") +- + #define assert_rcu_or_wq_mutex_or_pool_mutex(wq) \ + RCU_LOCKDEP_WARN(!rcu_read_lock_held() && \ + !lockdep_is_held(&wq->mutex) && \ +@@ -425,9 +420,8 @@ static void workqueue_sysfs_unregister(s + * ignored. + */ + #define for_each_pwq(pwq, wq) \ +- list_for_each_entry_rcu((pwq), &(wq)->pwqs, pwqs_node) \ +- if (({ assert_rcu_or_wq_mutex(wq); false; })) { } \ +- else ++ list_for_each_entry_rcu((pwq), &(wq)->pwqs, pwqs_node, \ ++ lockdep_is_held(&(wq->mutex))) + + #ifdef CONFIG_DEBUG_OBJECTS_WORK + |