[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.00.1106202008390.12963@kaball-desktop>
Date: Mon, 20 Jun 2011 20:16:01 +0100
From: Stefano Stabellini <stefano.stabellini@...citrix.com>
To: Ian Jackson <Ian.Jackson@...citrix.com>
CC: Stefano Stabellini <Stefano.Stabellini@...citrix.com>,
"hpa@...or.com" <hpa@...or.com>,
"xen-devel@...ts.xensource.com" <xen-devel@...ts.xensource.com>,
"konrad.wilk@...cle.com" <konrad.wilk@...cle.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"mingo@...e.hu" <mingo@...e.hu>,
"hpa@...ux.intel.com" <hpa@...ux.intel.com>,
"yinghai@...nel.org" <yinghai@...nel.org>
Subject: Re: [Xen-devel] [PATCH 1/3] x86: calculate precisely the memory
needed by init_memory_mapping
On Fri, 17 Jun 2011, Ian Jackson wrote:
> stefano.stabellini@...citrix.com writes ("[Xen-devel] [PATCH 1/3] x86: calculate precisely the memory needed by init_memory_mapping"):
> > + if (pgt_buf_end != pgt_buf_top)
> > + printk(KERN_DEBUG "initial kernel pagetable allocation wasted %lx"
> > + " pages\n", pgt_buf_top - pgt_buf_end);
>
> If (due to a bug) pgt_buf_end > pgt_buf_top, this will printk a
> message about wasting a negative number of pages, rather than
> crashing. Is there something else that will catch this case ?
Thanks for reviewing this patch!
Yes, there is something else that catches this case: both the 32 bit
and the 64 bit versions of alloc_low_page contain this code:
unsigned long pfn = pgt_buf_end++;
if (pfn >= pgt_buf_top)
panic("alloc_low_page: ran out of memory");
so we are safe from that point of view.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists