From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Hopwood Subject: Re: [PATCH] Trivial fix for latent bug in page_alloc.c Date: Wed, 02 Feb 2005 23:31:12 +0000 Message-ID: <420162C0.9000404@blueyonder.co.uk> References: <1106106821.20879.14.camel@localhost.localdomain> <41EE8EBE.2080900@blueyonder.co.uk> <1107317570.10400.38.camel@localhost.localdomain> Reply-To: david.nospam.hopwood@blueyonder.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit In-Reply-To: <1107317570.10400.38.camel@localhost.localdomain> Sender: xen-devel-admin@lists.sourceforge.net Errors-To: xen-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: xen-devel@lists.sourceforge.net List-Id: xen-devel@lists.xenproject.org Rusty Russell wrote: >>>@@ -251,17 +249,18 @@ >>> int i; >>> struct pfn_info *pg; >>> >>>- if ( unlikely(order < MIN_ORDER) || unlikely(order > MAX_ORDER) ) >>>+ ASSERT(order >= 0); >>>+ if ( unlikely(order >= MAX_ORDER) ) >>> return NULL; >> [...] >>Also changing > to >= is wrong. > > Well, it's consistent with the rest of the patch. How so? 'order == MAX_ORDER' is possible and valid, unless MAX_ORDER is misnamed. -- David Hopwood ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl