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: <20251201124205.11169-28-yurand2000@gmail.com>
Date: Mon,  1 Dec 2025 13:42:00 +0100
From: Yuri Andriaccio <yurand2000@...il.com>
To: Ingo Molnar <mingo@...hat.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Juri Lelli <juri.lelli@...hat.com>,
	Vincent Guittot <vincent.guittot@...aro.org>,
	Dietmar Eggemann <dietmar.eggemann@....com>,
	Steven Rostedt <rostedt@...dmis.org>,
	Ben Segall <bsegall@...gle.com>,
	Mel Gorman <mgorman@...e.de>,
	Valentin Schneider <vschneid@...hat.com>
Cc: linux-kernel@...r.kernel.org,
	Luca Abeni <luca.abeni@...tannapisa.it>,
	Yuri Andriaccio <yuri.andriaccio@...tannapisa.it>
Subject: [RFC PATCH v4 27/28] [DEBUG] sched/rt: Add debug BUG_ONs for pre-migration code

Add debug BUG_ONs in rt_queue_push/pull_task(s).
Can be safely added after all the pre-migration patches.

These are extra asserts which are only useful to debug the kernel code and
are not meant to be part of the final patchset.

Signed-off-by: Yuri Andriaccio <yurand2000@...il.com>
---
 kernel/sched/rt.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
index 80580b48ab..435d147aa5 100644
--- a/kernel/sched/rt.c
+++ b/kernel/sched/rt.c
@@ -319,6 +319,9 @@ static inline void rt_queue_push_tasks(struct rt_rq *rt_rq)
 {
 	struct rq *rq = served_rq_of_rt_rq(rt_rq);

+	BUG_ON(rt_rq == NULL);
+	BUG_ON(rq != cpu_rq(rq->cpu));
+
 	if (!has_pushable_tasks(rt_rq))
 		return;

@@ -329,6 +332,9 @@ static inline void rt_queue_pull_task(struct rt_rq *rt_rq)
 {
 	struct rq *rq = served_rq_of_rt_rq(rt_rq);

+	BUG_ON(rt_rq == NULL);
+	BUG_ON(rq != cpu_rq(rq->cpu));
+
 	queue_balance_callback(rq, &per_cpu(rt_pull_head, rq->cpu), pull_rt_task);
 }

--
2.51.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ