From: Sasha Levin Date: Mon, 14 Oct 2024 04:07:31 +0000 (-0400) Subject: Replace backport of a lockdep series on 5.4 X-Git-Tag: v5.10.227~56 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1d004cbe12d880e18ce50a42147e6b55283173a3;p=thirdparty%2Fkernel%2Fstable-queue.git Replace backport of a lockdep series on 5.4 Signed-off-by: Sasha Levin --- diff --git a/queue-5.4/lockdep-fix-deadlock-issue-between-lockdep-and-rcu.patch b/queue-5.4/lockdep-fix-deadlock-issue-between-lockdep-and-rcu.patch index 9c3a314e467..28afe2bb7ad 100644 --- a/queue-5.4/lockdep-fix-deadlock-issue-between-lockdep-and-rcu.patch +++ b/queue-5.4/lockdep-fix-deadlock-issue-between-lockdep-and-rcu.patch @@ -1,11 +1,11 @@ -From 9b77da44049e49e040887d135333341e5eb18ca4 Mon Sep 17 00:00:00 2001 +From 209f6739bef65ed602e698f18a11861baa350914 Mon Sep 17 00:00:00 2001 From: Sasha Levin -Date: Thu, 20 Jun 2024 22:54:34 +0000 +Date: Sat, 12 Oct 2024 23:22:44 +0000 Subject: lockdep: fix deadlock issue between lockdep and rcu From: Zhiguo Niu -[ Upstream commit a6f88ac32c6e63e69c595bfae220d8641704c9b7 ] +commit a6f88ac32c6e63e69c595bfae220d8641704c9b7 upstream. There is a deadlock scenario between lockdep and rcu when rcu nocb feature is enabled, just as following call stack: @@ -70,6 +70,7 @@ Signed-off-by: Carlos Llamas Acked-by: Paul E. McKenney Signed-off-by: Boqun Feng Link: https://lore.kernel.org/r/20240620225436.3127927-1-cmllamas@google.com +Signed-off-by: Carlos Llamas Signed-off-by: Sasha Levin --- kernel/locking/lockdep.c | 48 ++++++++++++++++++++++++++-------------- diff --git a/queue-5.4/locking-lockdep-avoid-potential-access-of-invalid-me.patch b/queue-5.4/locking-lockdep-avoid-potential-access-of-invalid-me.patch index e4bef6fc419..ac1b1a9b76e 100644 --- a/queue-5.4/locking-lockdep-avoid-potential-access-of-invalid-me.patch +++ b/queue-5.4/locking-lockdep-avoid-potential-access-of-invalid-me.patch @@ -1,12 +1,12 @@ -From bd44862fbae7319075186917122f23728373c61d Mon Sep 17 00:00:00 2001 +From 8eed9b03fafab81b37dbc0aa4b14a7999258d925 Mon Sep 17 00:00:00 2001 From: Sasha Levin -Date: Sun, 2 Jan 2022 21:35:58 -0500 +Date: Sat, 12 Oct 2024 23:22:43 +0000 Subject: locking/lockdep: Avoid potential access of invalid memory in lock_class From: Waiman Long -[ Upstream commit 61cc4534b6550997c97a03759ab46b29d44c0017 ] +commit 61cc4534b6550997c97a03759ab46b29d44c0017 upstream. It was found that reading /proc/lockdep after a lockdep splat may potentially cause an access to freed memory if lockdep_unregister_key() @@ -32,7 +32,7 @@ Signed-off-by: Waiman Long Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Bart Van Assche Link: https://lkml.kernel.org/r/20220103023558.1377055-1-longman@redhat.com -Stable-dep-of: a6f88ac32c6e ("lockdep: fix deadlock issue between lockdep and rcu") +Signed-off-by: Carlos Llamas Signed-off-by: Sasha Levin --- kernel/locking/lockdep.c | 24 +++++++++++++++--------- diff --git a/queue-5.4/locking-lockdep-fix-bad-recursion-pattern.patch b/queue-5.4/locking-lockdep-fix-bad-recursion-pattern.patch index 582576a4139..1b5c168fc70 100644 --- a/queue-5.4/locking-lockdep-fix-bad-recursion-pattern.patch +++ b/queue-5.4/locking-lockdep-fix-bad-recursion-pattern.patch @@ -1,11 +1,11 @@ -From 695de97327d0ff04c3c8134ca9b98e3bdbe15b8f Mon Sep 17 00:00:00 2001 +From 24978d39901da5731e7ef2b08253e00d1f57346e Mon Sep 17 00:00:00 2001 From: Sasha Levin -Date: Fri, 13 Mar 2020 09:56:38 +0100 +Date: Sat, 12 Oct 2024 23:22:41 +0000 Subject: locking/lockdep: Fix bad recursion pattern From: Peter Zijlstra -[ Upstream commit 10476e6304222ced7df9b3d5fb0a043b3c2a1ad8 ] +commit 10476e6304222ced7df9b3d5fb0a043b3c2a1ad8 upstream. There were two patterns for lockdep_recursion: @@ -37,7 +37,7 @@ warning. Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200313093325.GW12561@hirez.programming.kicks-ass.net -Stable-dep-of: a6f88ac32c6e ("lockdep: fix deadlock issue between lockdep and rcu") +Signed-off-by: Carlos Llamas Signed-off-by: Sasha Levin --- kernel/locking/lockdep.c | 74 ++++++++++++++++++++++------------------ diff --git a/queue-5.4/locking-lockdep-rework-lockdep_lock.patch b/queue-5.4/locking-lockdep-rework-lockdep_lock.patch index 0e1fd393393..7a3ded41f07 100644 --- a/queue-5.4/locking-lockdep-rework-lockdep_lock.patch +++ b/queue-5.4/locking-lockdep-rework-lockdep_lock.patch @@ -1,11 +1,11 @@ -From 8b2b42aea942e3b2339ee85381d4da95f48a7e46 Mon Sep 17 00:00:00 2001 +From 573dcabddaf66eb9f9e5dd963d961b955a95dcc8 Mon Sep 17 00:00:00 2001 From: Sasha Levin -Date: Fri, 13 Mar 2020 11:09:49 +0100 +Date: Sat, 12 Oct 2024 23:22:42 +0000 Subject: locking/lockdep: Rework lockdep_lock From: Peter Zijlstra -[ Upstream commit 248efb2158f1e23750728e92ad9db3ab60c14485 ] +commit 248efb2158f1e23750728e92ad9db3ab60c14485 upstream. A few sites want to assert we own the graph_lock/lockdep_lock, provide a more conventional lock interface for it with a number of trivial @@ -13,7 +13,7 @@ debug checks. Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200313102107.GX12561@hirez.programming.kicks-ass.net -Stable-dep-of: a6f88ac32c6e ("lockdep: fix deadlock issue between lockdep and rcu") +Signed-off-by: Carlos Llamas Signed-off-by: Sasha Levin --- kernel/locking/lockdep.c | 89 ++++++++++++++++++++++------------------ diff --git a/queue-5.4/series b/queue-5.4/series index e41ad0394ef..c2202b20760 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -187,10 +187,6 @@ net-avoid-potential-underflow-in-qdisc_pkt_len_init-.patch net-add-more-sanity-checks-to-qdisc_pkt_len_init.patch ipv4-ip_gre-fix-drops-of-small-packets-in-ipgre_xmit.patch sctp-set-sk_state-back-to-closed-if-autobind-fails-i.patch -locking-lockdep-fix-bad-recursion-pattern.patch -locking-lockdep-rework-lockdep_lock.patch -locking-lockdep-avoid-potential-access-of-invalid-me.patch -lockdep-fix-deadlock-issue-between-lockdep-and-rcu.patch alsa-hda-realtek-fix-the-push-button-function-for-th.patch alsa-hda-generic-unconditionally-prefer-preferred_da.patch alsa-hda-conexant-fix-conflicting-quirk-for-system76.patch @@ -346,3 +342,7 @@ net-annotate-lockless-accesses-to-sk-sk_max_ack_back.patch sctp-ensure-sk_state-is-set-to-closed-if-hashing-fai.patch ppp-fix-ppp_async_encode-illegal-access.patch slip-make-slhc_remember-more-robust-against-maliciou.patch +locking-lockdep-fix-bad-recursion-pattern.patch +locking-lockdep-rework-lockdep_lock.patch +locking-lockdep-avoid-potential-access-of-invalid-me.patch +lockdep-fix-deadlock-issue-between-lockdep-and-rcu.patch