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-next>] [day] [month] [year] [list]
Message-Id: <20220521125420.12683-1-wudaemon@163.com>
Date:   Sat, 21 May 2022 12:54:20 +0000
From:   Junwen Wu <wudaemon@....com>
To:     mingo@...hat.com, peterz@...radead.org, juri.lelli@...hat.com,
        vincent.guittot@...aro.org, dietmar.eggemann@....com,
        rostedt@...dmis.org, bsegall@...gle.com, mgorman@...e.de,
        bristot@...hat.com
Cc:     linux-kernel@...r.kernel.org, Junwen Wu <wudaemon@....com>
Subject: [PATCH v1] sched: Fix a typo in scheduler

Nice value is MIN_NICE(-20) to MAX_NICE(19), it better uses
int instead of long.

Signed-off-by: Junwen Wu <wudaemon@....com>
---
 include/linux/sched.h | 2 +-
 kernel/sched/core.c   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/sched.h b/include/linux/sched.h
index 75ba8aa60248..cffc7cbed987 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1830,7 +1830,7 @@ static inline int dl_task_check_affinity(struct task_struct *p, const struct cpu
 #endif
 
 extern int yield_to(struct task_struct *p, bool preempt);
-extern void set_user_nice(struct task_struct *p, long nice);
+extern void set_user_nice(struct task_struct *p, int nice);
 extern int task_prio(const struct task_struct *p);
 
 /**
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index fcf0c180617c..15c1b63d771b 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -6888,7 +6888,7 @@ static inline int rt_effective_prio(struct task_struct *p, int prio)
 }
 #endif
 
-void set_user_nice(struct task_struct *p, long nice)
+void set_user_nice(struct task_struct *p, int nice)
 {
 	bool queued, running;
 	int old_prio;
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ