Commit:     3dd9fe8c397df68086e6a1b2160573abbe944813
Parent:     dc386d4d1e98bb39fb967ee156cd456c802fc692
Author:     KAMEZAWA Hiroyuki <[EMAIL PROTECTED]>
AuthorDate: Thu Jul 26 10:41:08 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Thu Jul 26 11:35:17 2007 -0700

    memory unplug: isolate_lru_page fix
    release_pages() in mm/swap.c changes page_count() to be 0 without removing
    PageLRU flag...
    This means isolate_lru_page() can see a page, PageLRU() &&
    page_count(page)==0..  This is BUG.  (get_page() will be called against
    count=0 page.)
    Signed-off-by: KAMEZAWA Hiroyuki <[EMAIL PROTECTED]>
    Acked-by: Christoph Lameter <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 mm/migrate.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/mm/migrate.c b/mm/migrate.c
index c8d8722..37c73b9 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -49,9 +49,8 @@ int isolate_lru_page(struct page *page, struct list_head 
                struct zone *zone = page_zone(page);
-               if (PageLRU(page)) {
+               if (PageLRU(page) && get_page_unless_zero(page)) {
                        ret = 0;
-                       get_page(page);
                        if (PageActive(page))
                                del_page_from_active_list(zone, page);
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to