Re: [RESEND PATCH] mm/compaction: fix an undefined behaviour

2019-03-14 Thread Vlastimil Babka
On 3/13/19 7:06 PM, Qian Cai wrote: > In a low-memory situation, cc->fast_search_fail can keep increasing as > it is unable to find an available page to isolate in > fast_isolate_freepages(). As the result, it could trigger an error > below, so just compare with the maximum bits can be shifted firs

[RESEND PATCH] mm/compaction: fix an undefined behaviour

2019-03-13 Thread Qian Cai
In a low-memory situation, cc->fast_search_fail can keep increasing as it is unable to find an available page to isolate in fast_isolate_freepages(). As the result, it could trigger an error below, so just compare with the maximum bits can be shifted first. UBSAN: Undefined behaviour in mm/compact