+ mm-fix-mixed-zone-detection-in-devm_memremap_pages-fix.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     From: Dan Williams <dan.j.williams@xxxxxxxxx>
has been added to the -mm tree.  Its filename is
     mm-fix-mixed-zone-detection-in-devm_memremap_pages-fix.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/mm-fix-mixed-zone-detection-in-devm_memremap_pages-fix.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/mm-fix-mixed-zone-detection-in-devm_memremap_pages-fix.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Dan Williams <dan.j.williams@xxxxxxxxx>
Subject: mm: fix 'size' alignment in devm_memremap_pages()

We need to align the end address, not just the size.

Signed-off-by: Dan Williams <dan.j.williams@xxxxxxxxx>
Cc: Toshi Kani <toshi.kani@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 kernel/memremap.c |   12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff -puN kernel/memremap.c~mm-fix-mixed-zone-detection-in-devm_memremap_pages-fix kernel/memremap.c
--- a/kernel/memremap.c~mm-fix-mixed-zone-detection-in-devm_memremap_pages-fix
+++ a/kernel/memremap.c
@@ -270,14 +270,16 @@ struct dev_pagemap *find_dev_pagemap(res
 void *devm_memremap_pages(struct device *dev, struct resource *res,
 		struct percpu_ref *ref, struct vmem_altmap *altmap)
 {
-	resource_size_t align_start = res->start & ~(SECTION_SIZE - 1);
-	resource_size_t align_size = ALIGN(resource_size(res), SECTION_SIZE);
-	int is_ram = region_intersects(align_start, align_size, "System RAM");
-	resource_size_t key, align_end;
+	resource_size_t key, align_start, align_size, align_end;
 	struct dev_pagemap *pgmap;
 	struct page_map *page_map;
+	int error, nid, is_ram;
 	unsigned long pfn;
-	int error, nid;
+
+	align_start = res->start & ~(SECTION_SIZE - 1);
+	align_size = ALIGN(res->start + resource_size(res), SECTION_SIZE)
+		- align_start;
+	is_ram = region_intersects(align_start, align_size, "System RAM");
 
 	if (is_ram == REGION_MIXED) {
 		WARN_ONCE(1, "%s attempted on mixed region %pr\n",
_

Patches currently in -mm which might be from dan.j.williams@xxxxxxxxx are

list-kill-list_force_poison.patch
mm-fix-mixed-zone-detection-in-devm_memremap_pages.patch
mm-fix-mixed-zone-detection-in-devm_memremap_pages-fix.patch
mm-exclude-zone_device-from-gfp_zone_table.patch
mm-zone_device-depends-on-sparsemem_vmemmap.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux