lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240913173941.2758596-2-lihuafei1@huawei.com>
Date: Sat, 14 Sep 2024 01:39:41 +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 v4 -next 2/2] watchdog/hardlockup/perf: Warn if watchdog_ev is overwritten

When we create 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

Powered by Openwall GNU/*/Linux Powered by OpenVZ