[Devel] [PATCH] fix of BUG_ON in drop_buffers

Mishin Dmitry dim at sw.ru
Tue Dec 13 07:18:05 PST 2005


Patch from Dmitry (dim@):
 - fixed race in pagevec_strip
   Bug #56040
   Bug #55235

-- 
Thanks,
Dmitry.
-------------- next part --------------
--- ./mm/swap.c.bh	2005-12-13 15:25:05.000000000 +0300
+++ ./mm/swap.c	2005-12-13 15:26:51.000000000 +0300
@@ -351,7 +351,9 @@ void pagevec_strip(struct pagevec *pvec)
 		struct page *page = pvec->pages[i];
 
 		if (PagePrivate(page) && !TestSetPageLocked(page)) {
-			try_to_release_page(page, 0);
+			/* need to recheck after lock */
+			if (page_has_buffers(page))
+				try_to_release_page(page, 0);
 			unlock_page(page);
 		}
 	}


More information about the Devel mailing list