16c080df7a
The second patch, that is reverted (first): `thermal: trip: Drop lockdep assertion from thermal_zone_trip_id()` only touches code introduced by the first patch. The first patch causes the following Oops (reproduced on an old HP DL380 G8): ``` [ 2.960519] ACPI: button: Power Button [PWRF] [ 2.963126] BUG: kernel NULL pointer dereference, address: 000000000000000c [ 2.965667] #PF: supervisor read access in kernel mode [ 2.966954] #PF: error_code(0x0000) - not-present page [ 2.966954] PGD 0 P4D 0 [ 2.966954] Oops: 0000 [#1] PREEMPT SMP PTI [ 2.966954] CPU: 0 PID: 1 Comm: swapper/0 Tainted: G I 6.5.13-4-pve #1 [ 2.966954] Hardware name: HP ProLiant DL380p Gen8, BIOS P70 05/24/2019 [ 2.966954] RIP: 0010:step_wise_throttle+0x48/0x360 [ 2.966954] Code: 04 25 28 00 00 00 48 89 45 d0 31 c0 48 63 c6 48 8d 14 40 48 8b 87 50 03 00 00 4c 8d 24 90 e8 cf d0 ff ff c6 45 bf 00 89 45 b4 <41> 8b 04 24 41 39 85 78 03 00 00 0f 8d a9 02 00 00 0f 1f 44 00 00 [ 2.966954] RSP: 0000:ffff9e2b8014bae8 EFLAGS: 00010246 [ 2.966954] RAX: 0000000000000002 RBX: 0000000000000001 RCX: 0000000000000000 [ 2.966954] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 [ 2.966954] RBP: ffff9e2b8014bb40 R08: 0000000000000000 R09: 0000000000000000 [ 2.966954] R10: 0000000000000000 R11: 0000000000000000 R12: 000000000000000c [ 2.966954] R13: ffff8c7ac421d000 R14: 0000000000000001 R15: 0000000000000000 [ 2.966954] FS: 0000000000000000(0000) GS:ffff8c7def600000(0000) knlGS:0000000000000000 [ 2.966954] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 2.966954] CR2: 000000000000000c CR3: 0000000513a34001 CR4: 00000000000606f0 [ 2.966954] Call Trace: [ 2.966954] <TASK> ``` the relevant mainline kernels (6.6.15), corresponding to the Ubuntu-patchset (which mixes changes from 6.6.15, with ones from 6.1.76) [0] - also boot happily - so I strongly assume that the changes depend on one of the many commits introduced in linux-upstream between v6.5.1 and v6.6.1. As it looks like a refactoring (upon which later changes are based), and not a bug-fix in itself - simply dropping it seems sensible. Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
25 lines
788 B
Diff
25 lines
788 B
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Stoiko Ivanov <s.ivanov@proxmox.com>
|
|
Date: Thu, 4 Apr 2024 11:41:15 +0200
|
|
Subject: [PATCH] Revert "thermal: trip: Drop lockdep assertion from
|
|
thermal_zone_trip_id()"
|
|
|
|
This reverts commit c723c4fca6d2db3815623ff4dc0ea51667b56b89.
|
|
---
|
|
drivers/thermal/thermal_trip.c | 2 ++
|
|
1 file changed, 2 insertions(+)
|
|
|
|
diff --git a/drivers/thermal/thermal_trip.c b/drivers/thermal/thermal_trip.c
|
|
index 68bea8706c597..1d4fe63e09f77 100644
|
|
--- a/drivers/thermal/thermal_trip.c
|
|
+++ b/drivers/thermal/thermal_trip.c
|
|
@@ -201,6 +201,8 @@ int thermal_zone_trip_id(struct thermal_zone_device *tz,
|
|
{
|
|
int i;
|
|
|
|
+ lockdep_assert_held(&tz->lock);
|
|
+
|
|
for (i = 0; i < tz->num_trips; i++) {
|
|
if (&tz->trips[i] == trip)
|
|
return i;
|