The patch titled Subject: mm/gup_benchmark: fix unsigned comparison to zero in __gup_benchmark_ioctl has been added to the -mm tree. Its filename is mm-gup_benchmark-fix-unsigned-comparison-to-zero-in-__gup_benchmark_ioctl.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/mm-gup_benchmark-fix-unsigned-comparison-to-zero-in-__gup_benchmark_ioctl.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/mm-gup_benchmark-fix-unsigned-comparison-to-zero-in-__gup_benchmark_ioctl.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: YueHaibing <yuehaibing@xxxxxxxxxx> Subject: mm/gup_benchmark: fix unsigned comparison to zero in __gup_benchmark_ioctl get_user_pages_fast() will return negative value if no pages were pinned, then be converted to a unsigned, which is compared to zero, giving the wrong result. Link: http://lkml.kernel.org/r/20180921095015.26088-1-yuehaibing@xxxxxxxxxx Fixes: 09e35a4a1ca8 ("mm/gup_benchmark: handle gup failures") Signed-off-by: YueHaibing <yuehaibing@xxxxxxxxxx> Reviewed-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> Cc: Michael S. Tsirkin <mst@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/gup_benchmark.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/mm/gup_benchmark.c~mm-gup_benchmark-fix-unsigned-comparison-to-zero-in-__gup_benchmark_ioctl +++ a/mm/gup_benchmark.c @@ -19,7 +19,8 @@ static int __gup_benchmark_ioctl(unsigne struct gup_benchmark *gup) { ktime_t start_time, end_time; - unsigned long i, nr, nr_pages, addr, next; + unsigned long i, nr_pages, addr, next; + int nr; struct page **pages; nr_pages = gup->size / PAGE_SIZE; _ Patches currently in -mm which might be from yuehaibing@xxxxxxxxxx are mm-gup_benchmark-fix-unsigned-comparison-to-zero-in-__gup_benchmark_ioctl.patch mm-swap-remove-duplicated-include-from-swapc.patch