From ca9b64bec04a6da6237c5eafd0ac7ff860ba8728 Mon Sep 17 00:00:00 2001 From: Chris Wright Date: Tue, 20 Jun 2006 15:57:29 -0700 Subject: [PATCH] signed vs. unsigned fix for UML uptime from Jeff Dike --- queue-2.6.17/series | 1 + queue-2.6.17/uml-fix-uptime.patch | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 queue-2.6.17/uml-fix-uptime.patch diff --git a/queue-2.6.17/series b/queue-2.6.17/series index 9563fb65991..22ac34daadc 100644 --- a/queue-2.6.17/series +++ b/queue-2.6.17/series @@ -12,3 +12,4 @@ sparc32-fix-iommu_flush_iotlb-end-address.patch ntfs-critical-bug-fix.patch x86-compile-fix-for-asm-i386-alternatives.h.patch bcm43xx-init-fix-for-possible-machine-check.patch +uml-fix-uptime.patch diff --git a/queue-2.6.17/uml-fix-uptime.patch b/queue-2.6.17/uml-fix-uptime.patch new file mode 100644 index 00000000000..0141c5f119f --- /dev/null +++ b/queue-2.6.17/uml-fix-uptime.patch @@ -0,0 +1,29 @@ +From stable-bounces@linux.kernel.org Tue Jun 20 15:25:45 2006 +Date: Tue, 20 Jun 2006 18:25:03 -0400 +From: Jeff Dike +To: stable@kernel.org +Cc: linux-kernel@vger.kernel.org, user-mode-linux-devel@lists.sourceforge.net +Subject: UML: fix uptime + +The use of signed instead of unsigned here broke the calculations on +negative numbers that are involved in calculating wall_to_monotonic. + +Signed-off-by: Jeff Dike +Signed-off-by: Chris Wright +--- + +--- + arch/um/kernel/time_kern.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- linux-2.6.17.1.orig/arch/um/kernel/time_kern.c ++++ linux-2.6.17.1/arch/um/kernel/time_kern.c +@@ -87,7 +87,7 @@ void timer_irq(union uml_pt_regs *regs) + + void time_init_kern(void) + { +- unsigned long long nsecs; ++ long long nsecs; + + nsecs = os_nsecs(); + set_normalized_timespec(&wall_to_monotonic, -nsecs / BILLION, -- 2.47.2