[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <174125999340.14745.5633520821144529020.tip-bot2@tip-bot2>
Date: Thu, 06 Mar 2025 11:19:53 -0000
From: "tip-bot2 for Li Huafei" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Li Huafei <lihuafei1@...wei.com>, Ingo Molnar <mingo@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>, Peter Zijlstra <peterz@...radead.org>,
x86@...nel.org, linux-kernel@...r.kernel.org
Subject:
[tip: perf/core] watchdog/hardlockup/perf: Warn if watchdog_ev is leaked
The following commit has been merged into the perf/core branch of tip:
Commit-ID: 05763885e327f0e257ee8b96b30ac1b95f7dd532
Gitweb: https://git.kernel.org/tip/05763885e327f0e257ee8b96b30ac1b95f7dd532
Author: Li Huafei <lihuafei1@...wei.com>
AuthorDate: Tue, 22 Oct 2024 03:30:04 +08:00
Committer: Ingo Molnar <mingo@...nel.org>
CommitterDate: Thu, 06 Mar 2025 12:07:39 +01:00
watchdog/hardlockup/perf: Warn if watchdog_ev is leaked
When creating a new perf_event for the hardlockup watchdog, it should not
happen that the old perf_event is not released.
Introduce a WARN_ONCE() that should never trigger.
[ mingo: Changed the type of the warning to WARN_ONCE(). ]
Signed-off-by: Li Huafei <lihuafei1@...wei.com>
Signed-off-by: Ingo Molnar <mingo@...nel.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Peter Zijlstra <peterz@...radead.org>
Link: https://lore.kernel.org/r/20241021193004.308303-2-lihuafei1@huawei.com
---
kernel/watchdog_perf.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/kernel/watchdog_perf.c b/kernel/watchdog_perf.c
index 2fdb96e..a78ff09 100644
--- a/kernel/watchdog_perf.c
+++ b/kernel/watchdog_perf.c
@@ -144,6 +144,7 @@ static int hardlockup_detector_event_create(void)
PTR_ERR(evt));
return PTR_ERR(evt);
}
+ WARN_ONCE(this_cpu_read(watchdog_ev), "unexpected watchdog_ev leak");
this_cpu_write(watchdog_ev, evt);
return 0;
}
Powered by blists - more mailing lists