Re: [PATCH] initrd: Fix virtual/physical mix-up in overwrite test

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

 



Hi,

On Sunday 16 December 2007, Geert Uytterhoeven wrote:

> --- a/init/main.c
> +++ b/init/main.c
> @@ -598,9 +598,9 @@ asmlinkage void __init start_kernel(void
>
>  #ifdef CONFIG_BLK_DEV_INITRD
>  	if (initrd_start && !initrd_below_start_ok &&
> -			initrd_start < min_low_pfn << PAGE_SHIFT) {
> +			virt_to_pfn(initrd_start) < min_low_pfn) {
>  		printk(KERN_CRIT "initrd overwritten (0x%08lx < 0x%08lx) - "
> -		    "disabling it.\n",initrd_start,min_low_pfn << PAGE_SHIFT);
> +		    "disabling it.\n", virt_to_pfn(initrd_start), min_low_pfn);
>  		initrd_start = 0;
>  	}
>  #endif

BTW this is some really old code, so another option might be to remove this 
check completely as the same check is already done via bootmem.

bye, Roman
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux