+ compaction-wrap-calculating-first-and-last-pfn-of-pageblock-fix.patch added to -mm tree

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

 



The patch titled
     Subject: mm, compaction: fix crash in get_pfnblock_flags_mask() from isolate_freepages():
has been added to the -mm tree.  Its filename is
     compaction-wrap-calculating-first-and-last-pfn-of-pageblock-fix.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/compaction-wrap-calculating-first-and-last-pfn-of-pageblock-fix.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/compaction-wrap-calculating-first-and-last-pfn-of-pageblock-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: Vlastimil Babka <vbabka@xxxxxxx>
Subject: mm, compaction: fix crash in get_pfnblock_flags_mask() from isolate_freepages():

In isolate_freepages(), low_pfn was mistakenly initialized to
pageblock_start_pfn() instead of pageblock_end_pfn(), creating a possible
underflow, as described by Hugh:

   There's a case when that "block_start_pfn -= pageblock_nr_pages" loop can
   pass through 0 and end up trying to access a pageblock before the start of
   the mem_map[].

Fixes: mmotm mm-compaction-wrap-calculating-first-and-last-pfn-of-pageblock.patch
Signed-off-by: Vlastimil Babka <vbabka@xxxxxxx>
Reported-by: Hugh Dickins <hughd@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/compaction.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN mm/compaction.c~compaction-wrap-calculating-first-and-last-pfn-of-pageblock-fix mm/compaction.c
--- a/mm/compaction.c~compaction-wrap-calculating-first-and-last-pfn-of-pageblock-fix
+++ a/mm/compaction.c
@@ -932,7 +932,7 @@ static void isolate_freepages(struct com
 	block_start_pfn = pageblock_start_pfn(cc->free_pfn);
 	block_end_pfn = min(block_start_pfn + pageblock_nr_pages,
 						zone_end_pfn(zone));
-	low_pfn = pageblock_start_pfn(cc->migrate_pfn);
+	low_pfn = pageblock_end_pfn(cc->migrate_pfn);
 
 	/*
 	 * Isolate free pages until enough are available to migrate the
_

Patches currently in -mm which might be from vbabka@xxxxxxx are

mm-wake-kcompactd-before-kswapds-short-sleep.patch
mm-compaction-wrap-calculating-first-and-last-pfn-of-pageblock.patch
compaction-wrap-calculating-first-and-last-pfn-of-pageblock-fix.patch
mm-compaction-reduce-spurious-pcplist-drains.patch
mm-compaction-skip-blocks-where-isolation-fails-in-async-direct-compaction.patch
cpuset-use-static-key-better-and-convert-to-new-api.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