Commit 40612351 authored by David Hildenbrand's avatar David Hildenbrand Committed by Martin Schwidefsky

s390: get_user_pages_fast() might sleep

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: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: default avatarDavid Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent db1c4515
...@@ -233,6 +233,7 @@ int get_user_pages_fast(unsigned long start, int nr_pages, int write, ...@@ -233,6 +233,7 @@ int get_user_pages_fast(unsigned long start, int nr_pages, int write,
struct mm_struct *mm = current->mm; struct mm_struct *mm = current->mm;
int nr, ret; int nr, ret;
might_sleep();
start &= PAGE_MASK; start &= PAGE_MASK;
nr = __get_user_pages_fast(start, nr_pages, write, pages); nr = __get_user_pages_fast(start, nr_pages, write, pages);
if (nr == nr_pages) if (nr == nr_pages)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment