From: Andrea Arcangeli <andrea@suse.de>
To: Timur Tabi <ttabi@interactivesi.com>
Cc: Linux Kernel Mailing list <linux-kernel@vger.kernel.org>
Subject: Re: Should page->count ever be -1?
Date: Wed, 3 Jan 2001 22:55:05 +0100 [thread overview]
Message-ID: <20010103225505.R32185@athlon.random> (raw)
In-Reply-To: <20010103210714Z129267-457+17@vger.kernel.org>
In-Reply-To: <20010103210714Z129267-457+17@vger.kernel.org>; from ttabi@interactivesi.com on Wed, Jan 03, 2001 at 03:07:03PM -0600
On Wed, Jan 03, 2001 at 03:07:03PM -0600, Timur Tabi wrote:
> I'm experiencing some kind of memory leaks playing with ioremap and iounmap,
> and I've narrowed down the problem to iounmap refusing to unmap the memory that
> I just mapped. The line of code in question is
>
> if (!PageReserved(page) && atomic_dec_and_test(&page->count)) {
>
> from page_alloc.c (this is 2.2.18pre15). It appears that page->count is
> already zero when this code is executed, and after it's executed, page->count
> becomes -1 (or more accurately, 0xFFFFFFFF). Is this acceptable, or is it an
> error condition?
It's an error condition. Make sure you marked the page as reserved in the mmap
callback if it's not an mmio region outside RAM.
Andrea
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2001-01-03 21:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-01-03 21:07 Should page->count ever be -1? Timur Tabi
2001-01-03 21:55 ` Andrea Arcangeli [this message]
2001-01-03 21:59 ` Timur Tabi
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=20010103225505.R32185@athlon.random \
--to=andrea@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=ttabi@interactivesi.com \
/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 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.