diff options
-rw-r--r-- | mm/memory.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/mm/memory.c b/mm/memory.c index e5628a5fd678..717aa0e3be2d 100644 --- a/mm/memory.c +++ b/mm/memory.c | |||
@@ -989,6 +989,8 @@ int get_user_pages(struct task_struct *tsk, struct mm_struct *mm, | |||
989 | int i; | 989 | int i; |
990 | unsigned int vm_flags; | 990 | unsigned int vm_flags; |
991 | 991 | ||
992 | if (len <= 0) | ||
993 | return 0; | ||
992 | /* | 994 | /* |
993 | * Require read or write permissions. | 995 | * Require read or write permissions. |
994 | * If 'force' is set, we only require the "MAY" flags. | 996 | * If 'force' is set, we only require the "MAY" flags. |