mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Segher Boessenkool <segher@kernel.crashing.org>
To: David Gibson <david@gibson.dropbear.id.au>
Cc: Andrew Morton <akpm@osdl.org>, Paul Mackerras <paulus@samba.org>,
	libhugetlbfs-devel@lists.sourceforge.net,
	linux-kernel@vger.kernel.org,
	William Lee Irwin <wli@holomorphy.com>,
	linuxppc-dev@ozlabs.org
Subject: Re: [powerpc] Fix bogus BUG_ON() in in hugetlb_get_unmapped_area()
Date: Fri, 22 Dec 2006 01:31:26 +0100	[thread overview]
Message-ID: <E5477CAE-3FE8-4441-9225-570DD0679765@kernel.crashing.org> (raw)
In-Reply-To: <20061221222303.GA6418@localhost.localdomain>

> +	if (len > TASK_SIZE)
> +		return -ENOMEM;

Shouldn't that be addr+len instead?  The check looks incomplete
otherwise.  And you meant ">=" I guess?

> -		/* Paranoia, caller should have dealt with this */
> -		BUG_ON((addr + len) > 0x100000000UL);
> -

Any real reason to remove the paranoia check?  If it's trivially
always satisfied, the compiler will get rid of it for you :-)

Cheers,


Segher


  reply	other threads:[~2006-12-22  0:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-21 22:23 David Gibson
2006-12-22  0:31 ` Segher Boessenkool [this message]
2006-12-22  1:17   ` David Gibson
2006-12-22 18:51     ` Segher Boessenkool

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=E5477CAE-3FE8-4441-9225-570DD0679765@kernel.crashing.org \
    --to=segher@kernel.crashing.org \
    --cc=akpm@osdl.org \
    --cc=david@gibson.dropbear.id.au \
    --cc=libhugetlbfs-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.org \
    --cc=wli@holomorphy.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

all inboxes | Powered by JetHome®