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: <1563934308-20833-1-git-send-email-xuyang2018.jy@cn.fujitsu.com>
Date:   Wed, 24 Jul 2019 10:11:48 +0800
From:   Yang Xu <xuyang2018.jy@...fujitsu.com>
To:     <akpm@...ux-foundation.org>, <gorcunov@...il.com>
CC:     <linux-kernel@...r.kernel.org>,
        Yang Xu <xuyang2018.jy@...fujitsu.com>
Subject: [PATCH v2] sys_prctl(): remove unsigned comparision with less than zero

Currently, when calling prctl(PR_SET_TIMERSLACK, arg2), arg2 is an
unsigned long value, arg2 will never < 0. Negative judgment is
meaningless, so remove it.

Fixes: 6976675d9404 ("hrtimer: create a "timer_slack" field in the task struct")
Signed-off-by: Yang Xu <xuyang2018.jy@...fujitsu.com>
Cc: Cyrill Gorcunov <gorcunov@...il.com>
---
 kernel/sys.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sys.c b/kernel/sys.c
index 2969304c29fe..701b5f00651d 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -2372,7 +2372,7 @@ SYSCALL_DEFINE5(prctl, int, option, unsigned long, arg2, unsigned long, arg3,
 			error = current->timer_slack_ns;
 		break;
 	case PR_SET_TIMERSLACK:
-		if (arg2 <= 0)
+		if (arg2 == 0)
 			current->timer_slack_ns =
 					current->default_timer_slack_ns;
 		else
-- 
2.18.1



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ