ChangeSet 1.1582, 2005/03/16 12:25:52-03:00, [EMAIL PROTECTED]

        Andrea Arcangeli: get_user_pages() shall not grab PG_reserved pages



 memory.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)


diff -Nru a/mm/memory.c b/mm/memory.c
--- a/mm/memory.c       2005-03-16 15:03:06 -08:00
+++ b/mm/memory.c       2005-03-16 15:03:06 -08:00
@@ -499,9 +499,11 @@
                                /* FIXME: call the correct function,
                                 * depending on the type of the found page
                                 */
-                               if (!pages[i])
-                                       goto bad_page;
-                               page_cache_get(pages[i]);
+                               if (!pages[i] || PageReserved(pages[i])) {
+                                       if (pages[i] != ZERO_PAGE(start))
+                                               goto bad_page;
+                               } else
+                                       page_cache_get(pages[i]);
                        }
                        if (vmas)
                                vmas[i] = vma;
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-24" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to