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]
Date:	Sat, 28 Nov 2015 21:46:10 -0500
From:	Antoine Busque <abusque@...icios.com>
To:	mingo@...hat.com
Cc:	peterz@...radead.com, linux-kernel@...r.kernel.org
Subject: [PATCH] sched: fix outdated comment on task_prio() return value

The comment describing the possible return values of the task_prio()
function, having not been updated in many years, was misleading. It
indicated an offset of -200 for RT tasks, and normal tasks having 32
possible priority values centered around 0. This is no longer the
case, as the values it returns will be in the range [-100..39]. The
new comment reflects the current behaviour.

Signed-off-by: Antoine Busque <abusque@...icios.com>
---
 kernel/sched/core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index bbe9577..b9e5f4a 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -3106,8 +3106,8 @@ SYSCALL_DEFINE1(nice, int, increment)
  * @p: the task in question.
  *
  * Return: The priority value as seen by users in /proc.
- * RT tasks are offset by -200. Normal tasks are centered
- * around 0, value goes from -16 to +15.
+ * Values range from -100 to to -2 for RT tasks, and from
+ * 0 to 39 for normal tasks.
  */
 int task_prio(const struct task_struct *p)
 {
-- 
2.6.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists