From: Tejun Heo <tj@kernel.org>
To: Greg Pearson <greg.pearson@hp.com>
Cc: hpa@linux.intel.com, akpm@linux-foundation.org,
shangw@linux.vnet.ibm.com, mingo@elte.hu, yinghai@kernel.org,
benh@kernel.crashing.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] mm/memblock: fix overlapping allocation when doubling reserved array
Date: Mon, 18 Jun 2012 12:36:00 -0700 [thread overview]
Message-ID: <20120618193600.GA30670@google.com> (raw)
In-Reply-To: <1340044127-13864-1-git-send-email-greg.pearson@hp.com>
Hello, Greg.
Tricky one. Nice catch.
> diff --git a/mm/memblock.c b/mm/memblock.c
> index 952123e..3a61e74 100644
> --- a/mm/memblock.c
> +++ b/mm/memblock.c
> @@ -184,7 +184,9 @@ static void __init_memblock memblock_remove_region(struct memblock_type *type, u
> }
> }
>
> -static int __init_memblock memblock_double_array(struct memblock_type *type)
> +static int __init_memblock memblock_double_array(struct memblock_type *type,
> + phys_addr_t exclude_start,
> + phys_addr_t exclude_size)
I find @exclude_start and size a bit misleading mostly because
memblock_double_array() would then proceed to ignore the specified
area. Wouldn't it be better to use names which signify that they're
the reason why the array is being doubled instead? e.g. sth like
@new_area_start, @new_area_size. Can you please also add /** function
comment explaning the subtlety?
Thanks.
--
tejun
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2012-06-18 19:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-18 18:28 [PATCH v3] mm/memblock: fix overlapping allocation when doubling reserved array Greg Pearson
2012-06-18 19:36 ` Tejun Heo [this message]
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=20120618193600.GA30670@google.com \
--to=tj@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=benh@kernel.crashing.org \
--cc=greg.pearson@hp.com \
--cc=hpa@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mingo@elte.hu \
--cc=shangw@linux.vnet.ibm.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;
as well as URLs for NNTP newsgroup(s).