mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Yinghai Lu <yinghai@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Ingo Molnar <mingo@elte.hu>, "H. Peter Anvin" <hpa@zytor.com>,
	"'Russell King - ARM Linux'" <linux@arm.linux.org.uk>,
	Kevin Hilman <khilman@linaro.org>,
	Olof Johansson <olof@lixom.net>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	Dave Hansen <dave.hansen@intel.com>,
	Santosh Shilimkar <santosh.shilimkar@ti.com>,
	linux-kernel@vger.kernel.org, Kevin Hilman <khilman@linaro.org>,
	Olof Johansson <olof@lixom.net>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Subject: Re: [PATCH] memblock: Add limit checking to memblock_virt_alloc
Date: Tue, 28 Jan 2014 14:08:39 -0800	[thread overview]
Message-ID: <20140128140839.733d94150b99aaf7ac08bf96@linux-foundation.org> (raw)
In-Reply-To: <1390946665-2967-1-git-send-email-yinghai@kernel.org>

On Tue, 28 Jan 2014 14:04:25 -0800 Yinghai Lu <yinghai@kernel.org> wrote:

> In original bootmem wrapper for memblock, we have limit checking.
> 
> Add it to memblock_virt_alloc, to address arm and x86 booting crash.
> 
> ...
>
> --- linux-2.6.orig/mm/memblock.c
> +++ linux-2.6/mm/memblock.c
> @@ -1077,6 +1077,9 @@ static void * __init memblock_virt_alloc
>  	if (!align)
>  		align = SMP_CACHE_BYTES;
>  
> +	if (max_addr > memblock.current_limit)
> +		max_addr = memblock.current_limit;
> +
>  again:
>  	alloc = memblock_find_in_range_node(size, align, min_addr, max_addr,
>  					    nid);

Thanks.

Kevin, Olof and Konrad (at least) have been hitting this.  It would be
great to get some tested-by's, please?


  parent reply	other threads:[~2014-01-28 22:08 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-28 22:04 Yinghai Lu
2014-01-28 22:08 ` Dave Hansen
2014-01-28 22:47   ` Yinghai Lu
2014-01-28 22:55     ` Dave Hansen
2014-01-29  1:50     ` Konrad Rzeszutek Wilk
2014-01-29 23:07       ` Tony Luck
2014-01-29 23:39         ` Yinghai Lu
2014-01-29 23:53           ` Yinghai Lu
2014-01-30  0:12             ` Tony Luck
2014-01-30  0:34               ` Andrew Morton
2014-01-30  0:46                 ` Tony Luck
2014-01-28 22:08 ` Andrew Morton [this message]
2014-01-28 22:08 ` Olof Johansson
2014-01-29  1:25 ` Kevin Hilman
2014-01-30  4:46 ` Sachin Kamat

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=20140128140839.733d94150b99aaf7ac08bf96@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=dave.hansen@intel.com \
    --cc=hpa@zytor.com \
    --cc=khilman@linaro.org \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=mingo@elte.hu \
    --cc=olof@lixom.net \
    --cc=santosh.shilimkar@ti.com \
    --cc=torvalds@linux-foundation.org \
    --cc=yinghai@kernel.org \
    /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

all inboxes | Powered by JetHome®