[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20241021193004.308303-2-lihuafei1@huawei.com>
Date: Tue, 22 Oct 2024 03:30:04 +0800
From: Li Huafei <lihuafei1@...wei.com>
To: <tglx@...utronix.de>, <peterz@...radead.org>
CC: <akpm@...ux-foundation.org>, <linux@...ssschuh.net>, <song@...nel.org>,
<dianders@...omium.org>, <j.granados@...sung.com>,
<liusong@...ux.alibaba.com>, <lizhe.67@...edance.com>,
<yaoma@...ux.alibaba.com>, <dzickus@...hat.com>, <mingo@...nel.org>,
<linux-kernel@...r.kernel.org>, <lihuafei1@...wei.com>
Subject: [PATCH RESEND 2/2] watchdog/hardlockup/perf: Warn if watchdog_ev is overwritten
When creating a new perf_event, it should not happen that the old
perf_event is not released. If it does, make a warning to sense the
problem in time.
Signed-off-by: Li Huafei <lihuafei1@...wei.com>
---
kernel/watchdog_perf.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/kernel/watchdog_perf.c b/kernel/watchdog_perf.c
index 2fdb96eaf493..09236586b8c3 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_ON(this_cpu_read(watchdog_ev));
this_cpu_write(watchdog_ev, evt);
return 0;
}
--
2.25.1
Powered by blists - more mailing lists