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>] [day] [month] [year] [list]
Message-ID: <20250127095321.68588-1-yuntao.wang@linux.dev>
Date: Mon, 27 Jan 2025 17:53:21 +0800
From: Yuntao Wang <yuntao.wang@...ux.dev>
To: linux-kernel@...r.kernel.org
Cc: Tejun Heo <tj@...nel.org>,
	Frederic Weisbecker <frederic@...nel.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Petr Mladek <pmladek@...e.com>,
	Hao Luo <haoluo@...gle.com>,
	David Vernet <dvernet@...a.com>,
	"Paul E. McKenney" <paulmck@...nel.org>,
	Wardenjohn <zhangwarden@...il.com>,
	Yuntao Wang <yuntao.wang@...ux.dev>
Subject: [PATCH] init_task: Use the existing DEFAULT_PRIO macro instead of open-coding it

There is already a DEFAULT_PRIO macro, which is equal to 'MAX_PRIO - 20'.

We can use it directly in init_task instead of open-coding it.

Signed-off-by: Yuntao Wang <yuntao.wang@...ux.dev>
---
 init/init_task.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/init/init_task.c b/init/init_task.c
index e557f622bd90..5933f5dddc3e 100644
--- a/init/init_task.c
+++ b/init/init_task.c
@@ -72,9 +72,9 @@ struct task_struct init_task __aligned(L1_CACHE_BYTES) = {
 	.stack		= init_stack,
 	.usage		= REFCOUNT_INIT(2),
 	.flags		= PF_KTHREAD,
-	.prio		= MAX_PRIO - 20,
-	.static_prio	= MAX_PRIO - 20,
-	.normal_prio	= MAX_PRIO - 20,
+	.prio		= DEFAULT_PRIO,
+	.static_prio	= DEFAULT_PRIO,
+	.normal_prio	= DEFAULT_PRIO,
 	.policy		= SCHED_NORMAL,
 	.cpus_ptr	= &init_task.cpus_mask,
 	.user_cpus_ptr	= NULL,
-- 
2.47.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ