WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] Trivial fix for latent bug in page_alloc.c

On Wed, 2005-02-02 at 23:31 +0000, David Hopwood wrote:
> 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.

Yes, I erred badly in not using NR_ORDERS, which lead to this
conversation.  Nomenclature is important, and I made a hash of it in
this patch.  Fortunately, greater minds such as yours spat it out 8)

Thanks,
Rusty.
-- 
A bad analogy is like a leaky screwdriver -- Richard Braakman



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel

<Prev in Thread] Current Thread [Next in Thread>