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  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]
Date:	Mon, 19 May 2014 06:08:08 -0700
From:	tip-bot for Michael Kerrisk <>
Subject: [tip:sched/core] sched: Simplify return logic in sched_copy_attr(

Commit-ID:  814927325e815b667a133d9dcdf2286f88b78328
Author:     Michael Kerrisk <>
AuthorDate: Fri, 9 May 2014 16:54:28 +0200
Committer:  Thomas Gleixner <>
CommitDate: Mon, 19 May 2014 22:02:39 +0900

sched: Simplify return logic in sched_copy_attr()

The logic in this function is a little contorted:
* Rather than having chained gotos for the -EFBIG case, just
  return -EFBIG directly.
* Now, the label 'out' is no longer needed, and 'ret' must be zero
  zero by the time we fall through to this point, so just return 0.

Signed-off-by: Michael Kerrisk <>
Signed-off-by: Peter Zijlstra <>
Signed-off-by: Thomas Gleixner <>
 kernel/sched/core.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 9e1a3e0..08b6355 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -3657,13 +3657,11 @@ static int sched_copy_attr(struct sched_attr __user *uattr,
 	attr->sched_nice = clamp(attr->sched_nice, MIN_NICE, MAX_NICE);
-	return ret;
+	return 0;
 	put_user(sizeof(*attr), &uattr->size);
-	ret = -E2BIG;
-	goto out;
+	return -E2BIG;
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

Powered by blists - more mailing lists