From: tip-bot for Dave Jones <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: mingo@kernel.org, davej@codemonkey.org.uk, hpa@zytor.com,
linux-kernel@vger.kernel.org, tglx@linutronix.de
Subject: [tip:x86/urgent] x86/mm: Make split_page_count check for empty levels
Date: Tue, 12 Jan 2016 02:12:37 -0800 [thread overview]
Message-ID: <tip-3f1ac1cdc4fdf894e35c0e4fd103b54eec8a28c0@git.kernel.org> (raw)
In-Reply-To: <20160111170428.GA8547@codemonkey.org.uk>
Commit-ID: 3f1ac1cdc4fdf894e35c0e4fd103b54eec8a28c0
Gitweb: http://git.kernel.org/tip/3f1ac1cdc4fdf894e35c0e4fd103b54eec8a28c0
Author: Dave Jones <davej@codemonkey.org.uk>
AuthorDate: Mon, 11 Jan 2016 12:04:28 -0500
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Tue, 12 Jan 2016 11:04:53 +0100
x86/mm: Make split_page_count check for empty levels
In PAGEALLOC_DEBUG builds, we disable the 2M pages. Unfortunatly when we
split up mappings during boot, split_page_count doesn't take this into
account, and starts decrementing an empty direct_pages_count level.
This results in /proc/meminfo showing crazy things like
DirectMap2M: 18446744073709543424 kB
Signed-off-by: Dave Jones <davej@codemonkey.org.uk>
Link: http://lkml.kernel.org/r/20160111170428.GA8547@codemonkey.org.uk
Cc: stable@vger.kernel.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
arch/x86/mm/pageattr.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c
index a3137a4..ff0e0c6 100644
--- a/arch/x86/mm/pageattr.c
+++ b/arch/x86/mm/pageattr.c
@@ -66,6 +66,9 @@ void update_page_count(int level, unsigned long pages)
static void split_page_count(int level)
{
+ if (direct_pages_count[level] == 0)
+ return;
+
direct_pages_count[level]--;
direct_pages_count[level - 1] += PTRS_PER_PTE;
}
prev parent reply other threads:[~2016-01-12 10:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-11 17:04 [x86] " Dave Jones
2016-01-12 10:12 ` tip-bot for Dave Jones [this message]
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=tip-3f1ac1cdc4fdf894e35c0e4fd103b54eec8a28c0@git.kernel.org \
--to=tipbot@zytor.com \
--cc=davej@codemonkey.org.uk \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
/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
Powered by JetHome