All of lore.kernel.org
 help / color / mirror / Atom feed
* Race in shrink_cache
@ 2002-09-05  5:04 Daniel Phillips
  2002-09-05  6:36 ` Andrew Morton
  0 siblings, 1 reply; 12+ messages in thread
From: Daniel Phillips @ 2002-09-05  5:04 UTC (permalink / raw)
  To: Marcelo Tosatti, linux-kernel

Hi Marcelo,

This looks really suspicious, vmscan.c#435:

	spin_unlock(&pagemap_lru_lock);
							if (put_page_testzero(page))
								__free_pages_ok(page, 0);
	/* avoid to free a locked page */
	page_cache_get(page);

	/* whoops, double free coming */

I suggest you bump the page count before releasing the lru lock.  The race
shown above may not in fact be possible, but the current code is fragile.

-- 
Daniel

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2002-09-05 19:53 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-05  5:04 Race in shrink_cache Daniel Phillips
2002-09-05  6:36 ` Andrew Morton
2002-09-05  6:36   ` Daniel Phillips
2002-09-05  7:07     ` Andrew Morton
2002-09-05  7:28       ` Daniel Phillips
2002-09-05  7:53         ` Andrew Morton
2002-09-05 18:41           ` Daniel Phillips
2002-09-05 18:51             ` Andrew Morton
2002-09-05 19:08               ` Daniel Phillips
2002-09-05 19:22                 ` Andrew Morton
2002-09-05 20:00                   ` Daniel Phillips
2002-09-05 13:33     ` Rik van Riel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.