Re: [PATCH] mm/memory.c, 2.4.1 : memory leak with swap cache (updated)

From: Richard Jerrell (jerrell@missioncriticallinux.com)
Date: Tue Mar 27 2001 - 18:10:36 EST


> 1. we take an extra reference on the page, how does that
> affect the test for if the page is shared or not ?

is_page_shared expects us to have our own reference to the page.

> 2. we call delete_from_swap_cache with the pagemap_lru_lock
> held, since this tries to grab the pagecache_lock we can
> easily deadlock with the rest of the kernel (where the
> locking order is opposite)

You're right. Oversight on my part. Here is another version of the
patch.

> 3. there are no comments in the code explaining what this
> suspicious-looking piece of code does ;)

Oops... I sent out the wrong version of the patch the first time. This
one has comments, promise. And it has one less bug. :)

Rich



-
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/



This archive was generated by hypermail 2b29 : Sat Mar 31 2001 - 21:00:17 EST