From: akpm@linux-foundation.org
To: stefan.bader@canonical.com, stable@vger.kernel.org,
mm-commits@vger.kernel.org
Subject: [merged] mm-use-phys_addr_t-for-reserve_bootmem_region-arguments.patch removed from -mm tree
Date: Mon, 23 May 2016 12:46:50 -0700 [thread overview]
Message-ID: <57435e2a.iZaymbYZMALIDHCG%akpm@linux-foundation.org> (raw)
The patch titled
Subject: mm: use phys_addr_t for reserve_bootmem_region() arguments
has been removed from the -mm tree. Its filename was
mm-use-phys_addr_t-for-reserve_bootmem_region-arguments.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Stefan Bader <stefan.bader@canonical.com>
Subject: mm: use phys_addr_t for reserve_bootmem_region() arguments
Since 92923ca3aacef63 ("mm: meminit: only set page reserved in the
memblock region") the reserved bit is set on reserved memblock regions.
However start and end address are passed as unsigned long. This is only
32bit on i386, so it can end up marking the wrong pages reserved for
ranges at 4GB and above.
This was observed on a 32bit Xen dom0 which was booted with initial memory
set to a value below 4G but allowing to balloon in memory (dom0_mem=1024M
for example). This would define a reserved bootmem region for the
additional memory (for example on a 8GB system there was a reverved region
covering the 4GB-8GB range). But since the addresses were passed on as
unsigned long, this was actually marking all pages from 0 to 4GB as
reserved.
Fixes: 92923ca3aacef63 ("mm: meminit: only set page reserved in the memblock region")
Link: http://lkml.kernel.org/r/1463491221-10573-1-git-send-email-stefan.bader@canonical.com
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Cc: <stable@vger.kernel.org> [4.2+]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
include/linux/mm.h | 2 +-
mm/page_alloc.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff -puN include/linux/mm.h~mm-use-phys_addr_t-for-reserve_bootmem_region-arguments include/linux/mm.h
--- a/include/linux/mm.h~mm-use-phys_addr_t-for-reserve_bootmem_region-arguments
+++ a/include/linux/mm.h
@@ -1763,7 +1763,7 @@ extern void free_highmem_page(struct pag
extern void adjust_managed_page_count(struct page *page, long count);
extern void mem_init_print_info(const char *str);
-extern void reserve_bootmem_region(unsigned long start, unsigned long end);
+extern void reserve_bootmem_region(phys_addr_t start, phys_addr_t end);
/* Free the reserved page into the buddy system, so it gets managed. */
static inline void __free_reserved_page(struct page *page)
diff -puN mm/page_alloc.c~mm-use-phys_addr_t-for-reserve_bootmem_region-arguments mm/page_alloc.c
--- a/mm/page_alloc.c~mm-use-phys_addr_t-for-reserve_bootmem_region-arguments
+++ a/mm/page_alloc.c
@@ -1205,7 +1205,7 @@ static inline void init_reserved_page(un
* marks the pages PageReserved. The remaining valid pages are later
* sent to the buddy page allocator.
*/
-void __meminit reserve_bootmem_region(unsigned long start, unsigned long end)
+void __meminit reserve_bootmem_region(phys_addr_t start, phys_addr_t end)
{
unsigned long start_pfn = PFN_DOWN(start);
unsigned long end_pfn = PFN_UP(end);
_
Patches currently in -mm which might be from stefan.bader@canonical.com are
reply other threads:[~2016-05-23 19:46 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=57435e2a.iZaymbYZMALIDHCG%akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=mm-commits@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=stefan.bader@canonical.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