public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Ian Campbell <ian.campbell@citrix.com>
Cc: xen-devel@lists.xensource.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] xen: correct size of level2_kernel_pgt
Date: Fri, 29 Oct 2010 10:22:36 -0700	[thread overview]
Message-ID: <4CCB02DC.1010307@goop.org> (raw)
In-Reply-To: <1288367779-24001-1-git-send-email-ian.campbell@citrix.com>

 On 10/29/2010 08:56 AM, Ian Campbell wrote:
> sizeof(pmd_t *) is 4 bytes on PAE leading to an allocation of only
> 2048 bytes. The correct size is sizeof(pmd_t) giving us a full page
> allocation.
>
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
> Cc: Jeremy Fitzhardinge <jeremy@goop.org>
> ---
>
> Applies to mainline since 2.6.36 and to xen.git 2.6.32 based trees

This is just for 2.6.37?

    J

>  arch/x86/xen/mmu.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c
> index c237b81..21ed8d7 100644
> --- a/arch/x86/xen/mmu.c
> +++ b/arch/x86/xen/mmu.c
> @@ -2126,7 +2126,7 @@ __init pgd_t *xen_setup_kernel_pagetable(pgd_t *pgd,
>  {
>  	pmd_t *kernel_pmd;
>  
> -	level2_kernel_pgt = extend_brk(sizeof(pmd_t *) * PTRS_PER_PMD, PAGE_SIZE);
> +	level2_kernel_pgt = extend_brk(sizeof(pmd_t) * PTRS_PER_PMD, PAGE_SIZE);
>  
>  	max_pfn_mapped = PFN_DOWN(__pa(xen_start_info->pt_base) +
>  				  xen_start_info->nr_pt_frames * PAGE_SIZE +


  parent reply	other threads:[~2010-10-29 17:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-29 15:56 [PATCH] xen: correct size of level2_kernel_pgt Ian Campbell
2010-10-29 16:18 ` Jeremy Fitzhardinge
2010-10-29 17:22 ` Jeremy Fitzhardinge [this message]
2010-10-29 17:37   ` Ian Campbell
2010-10-29 17:45     ` [Xen-devel] " Jeremy Fitzhardinge
2010-10-29 17:55       ` Ian Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4CCB02DC.1010307@goop.org \
    --to=jeremy@goop.org \
    --cc=ian.campbell@citrix.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox