[PATCH] kexec-tools: ia64: fix bogus mem_max = ULONG_MAX

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


On Tue, Dec 05, 2006 at 11:37:09AM -0500, Bob Montgomery wrote:
> In kexec-tools-testing: kexec/arch/ia64/kexec-elf-ia64.c:
> 
> The "=" in "(mem_max = ULONG_MAX)" looks suspicious.  Intended?
> 
>         if (info->kexec_flags & KEXEC_ON_CRASH ) {
>                 if ((mem_min == 0x00) && (mem_max = ULONG_MAX)) {
>                         fprintf(stderr, "Failed to find crash kernel region in /proc/iomem\n");
> 
> No actual bug, just noticed while looking for something else.

That does look a bit broken, doesn't it. How about this?

===================================================================

fix bogus mem_max = ULONG_MAX

Cc: Bob Montgomery <bob.montgomery at hp.com>
Signed-Off-By: Simon Horman <horms at verge.net.au>

Index: kexec-tools-unstable/kexec/arch/ia64/kexec-elf-ia64.c
===================================================================
--- kexec-tools-unstable.orig/kexec/arch/ia64/kexec-elf-ia64.c	2006-12-13 11:12:39.000000000 +0900
+++ kexec-tools-unstable/kexec/arch/ia64/kexec-elf-ia64.c	2006-12-13 11:12:45.000000000 +0900
@@ -186,7 +186,7 @@
 	}
 
 	if (info->kexec_flags & KEXEC_ON_CRASH ) {
-		if ((mem_min == 0x00) && (mem_max = ULONG_MAX)) {
+		if ((mem_min == 0x00) && (mem_max == ULONG_MAX)) {
 			fprintf(stderr, "Failed to find crash kernel region in /proc/iomem\n");
 			free_elf_info(&ehdr);
 			return -1;



[Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Photo]     [Yosemite]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Linux Media]     [Linux Resources]

Powered by Linux