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
| ||
|
Date: Wed, 29 Jun 2011 13:44:15 +0800 From: hank <pyu@...hat.com> To: johnstul@...ibm.com, tglx@...utronix.de CC: linux-kernel@...r.kernel.org Subject: [PATCH 1/1] Change jiffies_to_clock_t function input parameter's, type to unsigned long >From dbc32d224ca024a98b2521a8a7bf20989bec34ee Mon Sep 17 00:00:00 2001 From: hank <pyu@...hat.com> Date: Wed, 29 Jun 2011 09:17:45 +0800 Subject: [PATCH 1/1] Change jiffies_to_clock_t function input parameter's type to unsigned long The parmaeter's origin type is long. On an i386 architecture, it can easily larger than 0x80000000, then this function convert it to a u64 type, get a result: 0xffffffff80000000, it is unexpected, so change the type to unsigned long, we can get the correct result: 0x0000000080000000 Signed-off-by: hank <pyu@...hat.com> --- kernel/time.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/kernel/time.c b/kernel/time.c index 8e8dc6d..d776062 100644 --- a/kernel/time.c +++ b/kernel/time.c @@ -575,7 +575,7 @@ EXPORT_SYMBOL(jiffies_to_timeval); /* * Convert jiffies/jiffies_64 to clock_t and back. */ -clock_t jiffies_to_clock_t(long x) +clock_t jiffies_to_clock_t(unsigned long x) { #if (TICK_NSEC % (NSEC_PER_SEC / USER_HZ)) == 0 # if HZ < USER_HZ -- 1.7.4.4 -- 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