Re: [PATCH] mm/page_alloc.c: eliminate unsigned confusion in __rmqueue_fallback

2017-06-24 Thread Wei Yang
On Wed, Jun 21, 2017 at 08:55:28PM +0200, Rasmus Villemoes wrote: >Since current_order starts as MAX_ORDER-1 and is then only >decremented, the second half of the loop condition seems >superfluous. However, if order is 0, we may decrement current_order >past 0, making it UINT_MAX. This is obviously

Re: [PATCH] mm/page_alloc.c: eliminate unsigned confusion in __rmqueue_fallback

2017-06-23 Thread Vlastimil Babka
On 06/21/2017 08:55 PM, Rasmus Villemoes wrote: > Since current_order starts as MAX_ORDER-1 and is then only > decremented, the second half of the loop condition seems > superfluous. However, if order is 0, we may decrement current_order > past 0, making it UINT_MAX. This is obviously too subtle ([

Re: [PATCH] mm/page_alloc.c: eliminate unsigned confusion in __rmqueue_fallback

2017-06-23 Thread Michal Hocko
On Wed 21-06-17 20:55:28, Rasmus Villemoes wrote: > Since current_order starts as MAX_ORDER-1 and is then only > decremented, the second half of the loop condition seems > superfluous. However, if order is 0, we may decrement current_order > past 0, making it UINT_MAX. This is obviously too subtle