lkml.org 
[lkml]   [2007]   [Dec]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] initrd: Fix virtual/physical mix-up in overwrite test
Date
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


\
 
 \ /
  Last update: 2007-12-17 05:17    [W:0.084 / U:0.352 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site