Re: 2.4.18(19) swapcache oops

From: Hugh Dickins (hugh@veritas.com)
Date: Thu Aug 15 2002 - 17:59:08 EST


On Thu, 15 Aug 2002, Andrew Morton wrote:
> Hugh Dickins wrote:
> > On Thu, 15 Aug 2002 j-nomura@ce.jp.nec.com wrote:
> > >
> > > I'm using 2.4.18 kernel and suspect there are swapcache race.
> > > I looked into 2.4.19 patch but could not find the fix to it.
> >
> > I see a benign race but no oops.
>
> But look at lru_cache_add():
>
> void lru_cache_add(struct page * page)
> {
> if (!TestSetPageLRU(page)) {
> /* window here */
> spin_lock(&pagemap_lru_lock);
> add_page_to_inactive_list(page);
> spin_unlock(&pagemap_lru_lock);
> }
> }
>
> It sets PG_lru before adding the page to the LRU.

Right you are! Thanks for correcting my dysanalysis.

Hugh

-
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 : Thu Aug 15 2002 - 22:00:41 EST