From: Daniel Phillips <phillips@arcor.de>
To: Marcelo Tosatti <marcelo@conectiva.com.br>, linux-kernel@vger.kernel.org
Subject: Race in shrink_cache
Date: Thu, 5 Sep 2002 07:04:28 +0200 [thread overview]
Message-ID: <E17mooe-00064m-00@starship> (raw)
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
next reply other threads:[~2002-09-05 4:57 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-05 5:04 Daniel Phillips [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E17mooe-00064m-00@starship \
--to=phillips@arcor.de \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo@conectiva.com.br \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®