diff options
author | David Howells <dhowells@redhat.com> | 2008-11-05 12:38:47 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-11-06 18:44:19 -0500 |
commit | 7597bc94d6f3bdccb086ac7f2ad91292fdaee2a4 (patch) | |
tree | 17126979600f74f27b45669861808e577c305920 /include/linux/hrtimer.h | |
parent | c36194871293100bd4b2ecb54ac9774d6e627aa2 (diff) |
Fix accidental implicit cast in HR-timer conversion
Fix the hrtimer_add_expires_ns() function. It should take a 'u64 ns' argument,
but rather takes an 'unsigned long ns' argument - which might only be 32-bits.
On FRV, this results in the kernel locking up because hrtimer_forward() passes
the result of a 64-bit multiplication to this function, for which the compiler
discards the top 32-bits - something that didn't happen when ktime_add_ns() was
called directly.
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/hrtimer.h')
-rw-r--r-- | include/linux/hrtimer.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index 2b3645b1acf4..07e510a3b00a 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h | |||
@@ -239,7 +239,7 @@ static inline void hrtimer_add_expires(struct hrtimer *timer, ktime_t time) | |||
239 | timer->_softexpires = ktime_add_safe(timer->_softexpires, time); | 239 | timer->_softexpires = ktime_add_safe(timer->_softexpires, time); |
240 | } | 240 | } |
241 | 241 | ||
242 | static inline void hrtimer_add_expires_ns(struct hrtimer *timer, unsigned long ns) | 242 | static inline void hrtimer_add_expires_ns(struct hrtimer *timer, u64 ns) |
243 | { | 243 | { |
244 | timer->_expires = ktime_add_ns(timer->_expires, ns); | 244 | timer->_expires = ktime_add_ns(timer->_expires, ns); |
245 | timer->_softexpires = ktime_add_ns(timer->_softexpires, ns); | 245 | timer->_softexpires = ktime_add_ns(timer->_softexpires, ns); |