public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Cc: benh@kernel.crashing.org, yinghai@kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] memblock: fix memblock_is_region_memory()
Date: Wed, 24 Nov 2010 15:31:54 -0800	[thread overview]
Message-ID: <20101124153154.a0e68722.akpm@linux-foundation.org> (raw)
In-Reply-To: <1289214013-13449-1-git-send-email-tomi.valkeinen@nokia.com>

On Mon,  8 Nov 2010 13:00:13 +0200
Tomi Valkeinen <tomi.valkeinen@nokia.com> wrote:

> To: benh@kernel.crashing.org, yinghai@kernel.org

wakey wakey!

> memblock_is_region_memory() uses reserved memblocks to search for the
> given region, while it should use the memory memblocks.
> 
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
> ---
>  mm/memblock.c |    8 ++++----
>  1 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/mm/memblock.c b/mm/memblock.c
> index 400dc62..bdba245 100644
> --- a/mm/memblock.c
> +++ b/mm/memblock.c
> @@ -683,13 +683,13 @@ int __init_memblock memblock_is_memory(phys_addr_t addr)
>  
>  int __init_memblock memblock_is_region_memory(phys_addr_t base, phys_addr_t size)
>  {
> -	int idx = memblock_search(&memblock.reserved, base);
> +	int idx = memblock_search(&memblock.memory, base);
>  
>  	if (idx == -1)
>  		return 0;
> -	return memblock.reserved.regions[idx].base <= base &&
> -		(memblock.reserved.regions[idx].base +
> -		 memblock.reserved.regions[idx].size) >= (base + size);
> +	return memblock.memory.regions[idx].base <= base &&
> +		(memblock.memory.regions[idx].base +
> +		 memblock.memory.regions[idx].size) >= (base + size);
>  }

What were the runtime effects of this problem?

afacit the only callers are a couple of obscure fbdev drivers.  Do you
know of other callers?

Thanks.


  reply	other threads:[~2010-11-24 23:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-08 11:00 [PATCH] memblock: fix memblock_is_region_memory() Tomi Valkeinen
2010-11-24 23:31 ` Andrew Morton [this message]
2010-11-25  9:17   ` Tomi Valkeinen

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=20101124153154.a0e68722.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=benh@kernel.crashing.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tomi.valkeinen@nokia.com \
    --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