Re: Kernel BUG at swap.c:62 [2.4.19 vanilla]

Hugh Dickins (hugh@veritas.com)
Wed, 16 Oct 2002 15:42:12 +0100 (BST)


On Wed, 16 Oct 2002, Thomas Langås wrote:
> kernel BUG at swap.c:62!

Andrew Morton foresaw that race, and fixed it in 2.4.20-pre3:

--- 2.4.19/mm/swap.c Wed Nov 7 06:44:20 2001
+++ 2.4.20-pre11/mm/swap.c Wed Oct 16 11:18:44 2002
@@ -57,9 +57,10 @@
*/
void lru_cache_add(struct page * page)
{
- if (!TestSetPageLRU(page)) {
+ if (!PageLRU(page)) {
spin_lock(&pagemap_lru_lock);
- add_page_to_inactive_list(page);
+ if (!TestSetPageLRU(page))
+ add_page_to_inactive_list(page);
spin_unlock(&pagemap_lru_lock);
}
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/