Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1376540
| From | Vlastimil Babka <vbabka@suse.cz> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: mmotm woes, mainly compaction |
| Date | 2016-04-12 10:10 +0200 |
| Message-ID | <rn1yy-3Sy-9@gated-at.bofh.it> (permalink) |
| References | <rn0Ma-3h8-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 04/12/2016 09:18 AM, Hugh Dickins wrote: > 2. Fix crash in get_pfnblock_flags_mask() from suitable_migration_target() > from isolate_freepages(): 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[]. (I have not worked out > why this never hit me before 4.6-rc2-mm1, it looks much older.) This is actually my fresh mmotm bug, thanks for catching that! Fix for: mm-compaction-wrap-calculating-first-and-last-pfn-of-pageblock.patch ----8<---- From 45330dfb350d6b3bc72bcdaccc226bcc286e1236 Mon Sep 17 00:00:00 2001 From: Vlastimil Babka <vbabka@suse.cz> Date: Tue, 12 Apr 2016 09:54:33 +0200 Subject: [PATCH] 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[]. Reported-by: Hugh Dickins <hughd@google.com> Signed-off-by: Vlastimil Babka <vbabka@suse.cz> --- mm/compaction.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/compaction.c b/mm/compaction.c index 315e5d57e7e9..67f886ecd773 100644 --- a/mm/compaction.c +++ b/mm/compaction.c @@ -1012,7 +1012,7 @@ static void isolate_freepages(struct compact_control *cc) 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 -- 2.8.1
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
mmotm woes, mainly compaction Hugh Dickins <hughd@google.com> - 2016-04-12 09:20 +0200
Re: mmotm woes, mainly compaction Vlastimil Babka <vbabka@suse.cz> - 2016-04-12 10:10 +0200
Re: mmotm woes, mainly compaction Vlastimil Babka <vbabka@suse.cz> - 2016-04-12 11:10 +0200
Re: mmotm woes, mainly compaction Vlastimil Babka <vbabka@suse.cz> - 2016-04-12 11:20 +0200
Re: mmotm woes, mainly compaction Vlastimil Babka <vbabka@suse.cz> - 2016-04-12 11:40 +0200
Re: mmotm woes, mainly compaction Vlastimil Babka <vbabka@suse.cz> - 2016-04-12 11:40 +0200
Re: mmotm woes, mainly compaction Michal Hocko <mhocko@kernel.org> - 2016-04-12 14:20 +0200
Re: mmotm woes, mainly compaction Michal Hocko <mhocko@kernel.org> - 2016-04-12 17:00 +0200
Re: mmotm woes, mainly compaction Hugh Dickins <hughd@google.com> - 2016-04-14 22:20 +0200
Re: mmotm woes, mainly compaction Vlastimil Babka <vbabka@suse.cz> - 2016-04-15 01:30 +0200
Re: mmotm woes, mainly compaction Hugh Dickins <hughd@google.com> - 2016-04-15 03:10 +0200
Re: mmotm woes, mainly compaction Michal Hocko <mhocko@kernel.org> - 2016-04-15 10:50 +0200
csiph-web