[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.