Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

Advertisement
[ Kernel ] [ Documentation ] [ Links ] [ Books ]

Advertisement

Kernel v2.6.24.3 /mm/memory.c

Filename:/mm/memory.c
Lines Added:2
Lines Deleted:0
Also changed in: (Previous) 2.6.24.3-rc1  2.6.24-git22  2.6.24-git21  2.6.24-git20  2.6.24-git19  2.6.24-git18 
(Following) 2.6.24.4  2.6.24.5  2.6.24.6  2.6.24.7  2.6.25-rc4  2.6.25-rc5 

Location
[  2.6.24.3
  [  mm
     o  memory.c

Patch

diff --git a/mm/memory.c b/mm/memory.c
index 4b0144b..da8b74b 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -980,6 +980,8 @@ int get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
    int i;
    unsigned int vm_flags;
 
+   if (len <= 0)
+      return 0;
    /* 
     * Require read or write permissions.
     * If 'force' is set, we only require the "MAY" flags.


Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.