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: <tip-dbebf7f826e1b3935f8bcd5d9681bf97708a7ddb@git.kernel.org>
Date:	Fri, 21 Feb 2014 13:34:15 -0800
From:	tip-bot for Dongsheng Yang <tipbot@...or.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...nel.org,
	peterz@...radead.org, tj@...nel.org, tglx@...utronix.de,
	yangds.fnst@...fujitsu.com
Subject: [tip:sched/core] workqueue:
  Replace hardcoding of -20 and 19 with MIN_NICE and MAX_NICE.

Commit-ID:  dbebf7f826e1b3935f8bcd5d9681bf97708a7ddb
Gitweb:     http://git.kernel.org/tip/dbebf7f826e1b3935f8bcd5d9681bf97708a7ddb
Author:     Dongsheng Yang <yangds.fnst@...fujitsu.com>
AuthorDate: Tue, 11 Feb 2014 15:34:52 +0800
Committer:  Thomas Gleixner <tglx@...utronix.de>
CommitDate: Fri, 21 Feb 2014 21:43:21 +0100

workqueue: Replace hardcoding of -20 and 19 with MIN_NICE and MAX_NICE.

Cc: Ingo Molnar <mingo@...nel.org>
Acked-by: Tejun Heo <tj@...nel.org>
Signed-off-by: Dongsheng Yang <yangds.fnst@...fujitsu.com>
Signed-off-by: Peter Zijlstra <peterz@...radead.org>
Link: http://lkml.kernel.org/r/6d85138180c00ce86975addab6e34b24b84f00a5.1392103744.git.yangds.fnst@cn.fujitsu.com
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
---
 kernel/workqueue.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 193e977..3fa5b8f 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -3225,7 +3225,7 @@ static ssize_t wq_nice_store(struct device *dev, struct device_attribute *attr,
 		return -ENOMEM;
 
 	if (sscanf(buf, "%d", &attrs->nice) == 1 &&
-	    attrs->nice >= -20 && attrs->nice <= 19)
+	    attrs->nice >= MIN_NICE && attrs->nice <= MAX_NICE)
 		ret = apply_workqueue_attrs(wq, attrs);
 	else
 		ret = -EINVAL;
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ