Skip to content

Commit

Permalink
s390: get_user_pages_fast() might sleep
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David Hildenbrand authored and Martin Schwidefsky committed Nov 27, 2015
1 parent db1c451 commit 4061235
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions arch/s390/mm/gup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 4061235

Please sign in to comment.