From: Toshi Kani <toshi.kani@hpe.com>
To: akpm@linux-foundation.org, gregkh@linuxfoundation.org
Cc: linux-mm@kvack.org, zhenzhang.zhang@huawei.com,
arbab@linux.vnet.ibm.com, dan.j.williams@intel.com,
abanman@sgi.com, rientjes@google.com,
linux-kernel@vger.kernel.org
Subject: [PATCH 0/2] fix a kernel oops in reading sysfs valid_zones
Date: Thu, 26 Jan 2017 14:44:13 -0700 [thread overview]
Message-ID: <20170126214415.4509-1-toshi.kani@hpe.com> (raw)
A sysfs memory file is created for each 128MiB or 2GiB of a memory
block on x86. [1] When the start address of a memory block is not
backed by struct page, i.e. memory range is not aligned by the memory
block size, reading its valid_zones attribute file leads to a kernel
oops. This patch-set fixes this issue.
Patch 1 first fixes an issue in test_pages_in_a_zone() that it does
not test the start section.
Patch 2 then fixes the kernel oops by extending test_pages_in_a_zone()
to return valid [start, end).
[1] 2GB when the system has 64GB or larger memory.
---
Toshi Kani (2):
1/2 mm/memory_hotplug.c: check start_pfn in test_pages_in_a_zone()
2/2 base/memory, hotplug: fix a kernel oops in show_valid_zones()
---
drivers/base/memory.c | 12 ++++++------
include/linux/memory_hotplug.h | 3 ++-
mm/memory_hotplug.c | 28 +++++++++++++++++++++-------
3 files changed, 29 insertions(+), 14 deletions(-)
--
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>
next reply other threads:[~2017-01-26 20:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-26 21:44 Toshi Kani [this message]
2017-01-26 21:44 ` [PATCH 1/2] mm/memory_hotplug.c: check start_pfn in test_pages_in_a_zone() Toshi Kani
2017-01-26 21:44 ` [PATCH 2/2] base/memory, hotplug: fix a kernel oops in show_valid_zones() Toshi Kani
2017-01-26 21:52 ` Andrew Morton
2017-01-26 22:26 ` Kani, Toshimitsu
2017-01-27 7:48 ` gregkh
2017-01-27 17:47 ` Kani, Toshimitsu
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=20170126214415.4509-1-toshi.kani@hpe.com \
--to=toshi.kani@hpe.com \
--cc=abanman@sgi.com \
--cc=akpm@linux-foundation.org \
--cc=arbab@linux.vnet.ibm.com \
--cc=dan.j.williams@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=rientjes@google.com \
--cc=zhenzhang.zhang@huawei.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).