From: Xishi Qiu <qiuxishi@huawei.com>
To: Toshi Kani <toshi.kani@hp.com>, "H. Peter Anvin" <hpa@zytor.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
Linux MM <linux-mm@kvack.org>, Xishi Qiu <qiuxishi@huawei.com>
Subject: [RFC] does ioremap() cause memory leak?
Date: Thu, 21 Dec 2017 16:55:10 +0800 [thread overview]
Message-ID: <5A3B76EE.8020001@huawei.com> (raw)
When we use iounmap() to free the mapping, it calls unmap_vmap_area() to clear page table,
but do not free the memory of page table, right?
So when use ioremap() to mapping another area(incluce the area before), it may use
large mapping(e.g. ioremap_pmd_enabled()), so the original page table memory(e.g. pte memory)
will be lost, it cause memory leak, right?
Thanks,
Xishi Qiu
--
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-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
WARNING: multiple messages have this Message-ID (diff)
From: Xishi Qiu <qiuxishi@huawei.com>
To: Toshi Kani <toshi.kani@hp.com>, "H. Peter Anvin" <hpa@zytor.com>,
"Thomas Gleixner" <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
Linux MM <linux-mm@kvack.org>, "Xishi Qiu" <qiuxishi@huawei.com>
Subject: [RFC] does ioremap() cause memory leak?
Date: Thu, 21 Dec 2017 16:55:10 +0800 [thread overview]
Message-ID: <5A3B76EE.8020001@huawei.com> (raw)
When we use iounmap() to free the mapping, it calls unmap_vmap_area() to clear page table,
but do not free the memory of page table, right?
So when use ioremap() to mapping another area(incluce the area before), it may use
large mapping(e.g. ioremap_pmd_enabled()), so the original page table memory(e.g. pte memory)
will be lost, it cause memory leak, right?
Thanks,
Xishi Qiu
next reply other threads:[~2017-12-21 8:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-21 8:55 Xishi Qiu [this message]
2017-12-21 8:55 ` [RFC] does ioremap() cause memory leak? Xishi Qiu
2017-12-23 5:32 ` Xishi Qiu
2017-12-23 5:32 ` Xishi Qiu
2017-12-23 5:32 ` Xishi Qiu
2018-01-02 1:39 ` Hanjun Guo
2018-01-02 1:39 ` Hanjun Guo
2018-01-02 1:39 ` Hanjun Guo
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=5A3B76EE.8020001@huawei.com \
--to=qiuxishi@huawei.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=toshi.kani@hp.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.