On Thu, 5 Mar 2015, Naoya Horiguchi wrote: > walk_page_test() is purely pagewalk's internal stuff, and its positive return > values are not intended to be passed to the callers of pagewalk. However, in > the current code if the last vma in the do-while loop in walk_page_range() > happens to return a positive value, it leaks outside walk_page_range(). > So the user visible effect is invalid/unexpected return value (according to > the reporter, mbind() causes it.) > > This patch fixes it simply by reinitializing the return value after checked. > > Another exposed interface, walk_page_vma(), already returns 0 for such cases > so no problem. > > Fixes: 6f4576e3687b ("mempolicy: apply page table walker on queue_pages_range()") > Reported-by: Kazutomo Yoshii <kazutomo.yoshii@xxxxxxxxx> > Signed-off-by: Naoya Horiguchi <n-horiguchi@xxxxxxxxxxxxx> Acked-by: David Rientjes <rientjes@xxxxxxxxxx> This is exactly what I had in mind, thanks for fixing it up so fast! -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>