linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Timur Tabi <ttabi@interactivesi.com>
To: Linux Kernel Mailing list <linux-kernel@vger.kernel.org>,
	Linux MM mailing list <linux-mm@kvack.org>
Subject: ioremap doesn't increment page->count, but iounmap decrements it
Date: Tue, 9 Jan 2001 11:35:09 -0600	[thread overview]
Message-ID: <20010109173247Z131189-223+7@kanga.kvack.org> (raw)

I just discovered an oddity in 2.2.18pre15.  When ioremap() is used to map
reserved pages (of real RAM), it does not increment the "count" field for the
page it remaps (i.e. page->count).  However, when you call iounmap on that
memory, that function decrements page->count.  Since the count was originally
zero, it gets decremented to -1, and that's when things start to go bad.

I get the feeling that if I remap reserved memory, I'm not supposed to ever
unmap it.  But that means that my driver will have a memory leak.  Can someone
help me out?


-- 
Timur Tabi - ttabi@interactivesi.com
Interactive Silicon - http://www.interactivesi.com

When replying to a mailing-list message, please direct the reply to the mailing list only.  Don't send another copy to me.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/

                 reply	other threads:[~2001-01-09 17:35 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20010109173247Z131189-223+7@kanga.kvack.org \
    --to=ttabi@interactivesi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.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