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:	Wed, 17 Mar 2010 10:03:38 GMT
From:	tip-bot for KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...hat.com,
	tglx@...utronix.de, kosaki.motohiro@...fujitsu.com, mingo@...e.hu
Subject: [tip:sched/urgent] sched: Use proper type in sched_getaffinity()

Commit-ID:  8bc037fb89bb3104b9ae290d18c877624cd7d9cc
Gitweb:     http://git.kernel.org/tip/8bc037fb89bb3104b9ae290d18c877624cd7d9cc
Author:     KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
AuthorDate: Wed, 17 Mar 2010 09:36:58 +0900
Committer:  Ingo Molnar <mingo@...e.hu>
CommitDate: Wed, 17 Mar 2010 10:48:49 +0100

sched: Use proper type in sched_getaffinity()

Using the proper type fixes the following compiler warning:

  kernel/sched.c:4850: warning: comparison of distinct pointer types lacks a cast

Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
Cc: torvalds@...ux-foundation.org
Cc: travis@....com
Cc: peterz@...radead.org
Cc: drepper@...hat.com
Cc: rja@....com
Cc: sharyath@...ibm.com
Cc: steiner@....com
LKML-Reference: <20100317090046.4C79.A69D9226@...fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@...e.hu>
---
 kernel/sched.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/sched.c b/kernel/sched.c
index 82975b5..49d2fa7 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -4912,7 +4912,7 @@ SYSCALL_DEFINE3(sched_getaffinity, pid_t, pid, unsigned int, len,
 
 	ret = sched_getaffinity(pid, mask);
 	if (ret == 0) {
-		int retlen = min(len, cpumask_size());
+		size_t retlen = min_t(size_t, len, cpumask_size());
 
 		if (copy_to_user(user_mask_ptr, mask, retlen))
 			ret = -EFAULT;
--
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