From: Ian Campbell <Ian.Campbell@citrix.com>
To: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: linux-kernel@vger.kernel.org, xen-devel@lists.xensource.com
Subject: Re: [PATCH] xen/p2m: Check __brk_limit before allocating.
Date: Thu, 26 Jul 2012 08:53:02 +0100 [thread overview]
Message-ID: <1343289182.8016.38.camel@dagon.hellion.org.uk> (raw)
In-Reply-To: <1343161413-11077-1-git-send-email-konrad.wilk@oracle.com>
On Tue, 2012-07-24 at 16:23 -0400, Konrad Rzeszutek Wilk wrote:
> diff --git a/arch/x86/xen/p2m.c b/arch/x86/xen/p2m.c
> index 64effdc..b5bb26c 100644
> --- a/arch/x86/xen/p2m.c
> +++ b/arch/x86/xen/p2m.c
> @@ -498,7 +498,14 @@ static bool alloc_p2m(unsigned long pfn)
>
> return true;
> }
> -
> +#include <asm/sections.h>
> +bool __init can_extend_brk()
> +{
> + /* Always reserve one for the DMI extend_brk call. */
That seems a bit fragile, what if someone adds something else or the
link order changes etc?
Can't we just have a variant of extend_brk which returns NULL instead of
BUG_ON and do error checking?
Or even just change extend_brk and push the BUG_ONs out to the callers
-- there aren't that many of them.
Ian.
--
Ian Campbell
Most people in this society who aren't actively mad are, at best,
reformed or potential lunatics.
-- Susan Sontag
next prev parent reply other threads:[~2012-07-26 7:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-24 20:23 [PATCH] xen/p2m: Check __brk_limit before allocating Konrad Rzeszutek Wilk
2012-07-26 7:53 ` Ian Campbell [this message]
2012-07-26 16:24 ` [Xen-devel] " Konrad Rzeszutek Wilk
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=1343289182.8016.38.camel@dagon.hellion.org.uk \
--to=ian.campbell@citrix.com \
--cc=konrad.wilk@oracle.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;
as well as URLs for NNTP newsgroup(s).