s390: get_user_pages_fast() might sleep
authorDavid Hildenbrand <dahi@linux.vnet.ibm.com>
Thu, 15 Oct 2015 08:47:18 +0000 (10:47 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Fri, 27 Nov 2015 08:24:15 +0000 (09:24 +0100)
Let's annotate it correctly, so we directly get a warning if
we ever were to use it in atomic/preempt_disable/spinlock environment.

Acked-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/mm/gup.c

index 12bbf0e8478f84d0fe464029648cf2333c0cfde3..21c74a71e2ab29f7243f013769a7b90d96181364 100644 (file)
@@ -233,6 +233,7 @@ int get_user_pages_fast(unsigned long start, int nr_pages, int write,
        struct mm_struct *mm = current->mm;
        int nr, ret;
 
+       might_sleep();
        start &= PAGE_MASK;
        nr = __get_user_pages_fast(start, nr_pages, write, pages);
        if (nr == nr_pages)