From: Heiko Carstens Date: Tue, 8 Oct 2013 07:29:09 +0000 (+0200) Subject: s390/gup: handle zero nr_pages case correctly X-Git-Tag: omap-for-v3.13/fixes-for-merge-window-take2~58^2~34 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eb0bf929d5228ca0eb2758585f2e4e25aa20427e;p=pandora-kernel.git s390/gup: handle zero nr_pages case correctly If [__]get_user_pages_fast() gets called with nr_pages == 0, the current code would walk the page tables and pin as many pages until the first invalid pte (or the kernel crashed while writing struct page pointers to the pages array). So let's handle at least the nr_pages == 0 case correctly and exit early. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky --- Reading git-diff-tree failed