Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1423148AbWLVAbg (ORCPT ); Thu, 21 Dec 2006 19:31:36 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1423147AbWLVAbg (ORCPT ); Thu, 21 Dec 2006 19:31:36 -0500 Received: from mail-in-11.arcor-online.net ([151.189.21.51]:43873 "EHLO mail-in-11.arcor-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1423148AbWLVAbf (ORCPT ); Thu, 21 Dec 2006 19:31:35 -0500 In-Reply-To: <20061221222303.GA6418@localhost.localdomain> References: <20061221222303.GA6418@localhost.localdomain> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: Cc: Andrew Morton , Paul Mackerras , libhugetlbfs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, William Lee Irwin , linuxppc-dev@ozlabs.org Content-Transfer-Encoding: 7bit From: Segher Boessenkool Subject: Re: [powerpc] Fix bogus BUG_ON() in in hugetlb_get_unmapped_area() Date: Fri, 22 Dec 2006 01:31:26 +0100 To: David Gibson X-Mailer: Apple Mail (2.752.2) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 646 Lines: 23 > + 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 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/