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] [day] [month] [year] [list]
Date:   Thu, 25 Mar 2021 11:08:37 -0000
From:   "tip-bot2 for Rasmus Villemoes" <tip-bot2@...utronix.de>
To:     linux-tip-commits@...r.kernel.org
Cc:     Rasmus Villemoes <linux@...musvillemoes.dk>,
        Ingo Molnar <mingo@...nel.org>,
        Peter Zijlstra <a.p.zijlstra@...llo.nl>, x86@...nel.org,
        linux-kernel@...r.kernel.org
Subject: [tip: sched/core] sched/core: Use -EINVAL in sched_dynamic_mode()

The following commit has been merged into the sched/core branch of tip:

Commit-ID:     c4681f3f1cfcfde0c95ff72f0bdb43f9ffd7f00e
Gitweb:        https://git.kernel.org/tip/c4681f3f1cfcfde0c95ff72f0bdb43f9ffd7f00e
Author:        Rasmus Villemoes <linux@...musvillemoes.dk>
AuthorDate:    Thu, 25 Mar 2021 01:45:15 +01:00
Committer:     Ingo Molnar <mingo@...nel.org>
CommitterDate: Thu, 25 Mar 2021 11:39:13 +01:00

sched/core: Use -EINVAL in sched_dynamic_mode()

-1 is -EPERM which is a somewhat odd error to return from
sched_dynamic_write(). No other callers care about which negative
value is used.

Signed-off-by: Rasmus Villemoes <linux@...musvillemoes.dk>
Signed-off-by: Ingo Molnar <mingo@...nel.org>
Acked-by: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Link: https://lore.kernel.org/r/20210325004515.531631-2-linux@rasmusvillemoes.dk
---
 kernel/sched/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 1fe9d3f..95bd6ab 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -5384,7 +5384,7 @@ static int sched_dynamic_mode(const char *str)
 	if (!strcmp(str, "full"))
 		return preempt_dynamic_full;
 
-	return -1;
+	return -EINVAL;
 }
 
 static void sched_dynamic_update(int mode)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ