mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Phillips <phillips@arcor.de>
To: "Heiko Carstens" <Heiko.Carstens@de.ibm.com>,
	linux-kernel@vger.kernel.org
Subject: Re: Kernel BUG at page_alloc.c:91! (2.4.19)
Date: Mon, 2 Sep 2002 12:44:49 +0200	[thread overview]
Message-ID: <E17lohO-0004gn-00@starship> (raw)
In-Reply-To: <OF990F4927.6697D5BE-ONC1256C28.002E59F8@de.ibm.com>

On Monday 02 September 2002 10:26, Heiko Carstens wrote:
> Looks to me that this function itself has a bug: after the drop_pte label 
> it is
> checked if the current page has a mapping. If this is true there is a jump 
> to
> the drop_pte label, where without any further checking 
> page_cache_release() gets
> called which will result in the above described BUG() if page_count(page) 

It's not a bug in itself.  The pte was cleared just above, so the reference
being dropped corresponds to the pte that was cleared.  Because the page
has a mapping, there is still at least one count on the page that got there
when the page was put in the page cache, so the page won't be freed just
yet.  (No, this code is not a model of clarity.)

Chances are, you've run into the subtle double-free race I've been working
on for the last few days.  Would you like to try this patch as see if it
makes a difference?

   http://nl.linux.org/~phillips/patches/lru.race-2.4.19


-- 
Daniel

  reply	other threads:[~2002-09-02 10:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-02  8:26 Heiko Carstens
2002-09-02 10:44 ` Daniel Phillips [this message]
2002-09-02 12:54 Heiko Carstens
2002-09-02 19:35 ` Daniel Phillips
2002-09-03 17:16 Heiko Carstens
2002-09-03 17:31 ` Daniel Phillips

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=E17lohO-0004gn-00@starship \
    --to=phillips@arcor.de \
    --cc=Heiko.Carstens@de.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    /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®