All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/7] mm/balloon_compaction: ignore anonymous pages
@ 2014-08-20 15:04 ` Konstantin Khlebnikov
  0 siblings, 0 replies; 42+ messages in thread
From: Konstantin Khlebnikov @ 2014-08-20 15:04 UTC (permalink / raw)
  To: linux-mm, Andrew Morton, Rafael Aquini
  Cc: Sasha Levin, Andrey Ryabinin, linux-kernel

Sasha Levin reported KASAN splash inside isolate_migratepages_range().
Problem is in function __is_movable_balloon_page() which tests AS_BALLOON_MAP
in page->mapping->flags. This function has no protection against anonymous
pages. As result it tried to check address space flags in inside anon-vma.

Signed-off-by: Konstantin Khlebnikov <k.khlebnikov@samsung.com>
Reported-by: Sasha Levin <sasha.levin@oracle.com>
Link: http://lkml.kernel.org/p/53E6CEAA.9020105@oracle.com
Cc: stable <stable@vger.kernel.org> # v3.8
---
 include/linux/balloon_compaction.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/balloon_compaction.h b/include/linux/balloon_compaction.h
index 089743a..53d482e 100644
--- a/include/linux/balloon_compaction.h
+++ b/include/linux/balloon_compaction.h
@@ -128,7 +128,7 @@ static inline bool page_flags_cleared(struct page *page)
 static inline bool __is_movable_balloon_page(struct page *page)
 {
 	struct address_space *mapping = page->mapping;
-	return mapping_balloon(mapping);
+	return !PageAnon(page) && mapping_balloon(mapping);
 }
 
 /*


^ permalink raw reply related	[flat|nested] 42+ messages in thread

end of thread, other threads:[~2014-08-30 16:36 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-20 15:04 [PATCH 1/7] mm/balloon_compaction: ignore anonymous pages Konstantin Khlebnikov
2014-08-20 15:04 ` Konstantin Khlebnikov
2014-08-20 15:04 ` [PATCH 2/7] mm/balloon_compaction: keep ballooned pages away from normal migration path Konstantin Khlebnikov
2014-08-20 15:04   ` Konstantin Khlebnikov
2014-08-20 23:33   ` Rafael Aquini
2014-08-20 23:33     ` Rafael Aquini
2014-08-20 15:04 ` [PATCH 3/7] mm/balloon_compaction: isolate balloon pages without lru_lock Konstantin Khlebnikov
2014-08-20 15:04   ` Konstantin Khlebnikov
2014-08-20 23:35   ` Rafael Aquini
2014-08-20 23:35     ` Rafael Aquini
2014-08-20 15:04 ` [PATCH 4/7] selftests/vm/transhuge-stress: stress test for memory compaction Konstantin Khlebnikov
2014-08-20 15:04   ` Konstantin Khlebnikov
2014-08-20 15:04 ` [PATCH 5/7] mm: introduce common page state for ballooned memory Konstantin Khlebnikov
2014-08-20 15:04   ` Konstantin Khlebnikov
2014-08-20 23:46   ` Rafael Aquini
2014-08-20 23:46     ` Rafael Aquini
2014-08-20 15:05 ` [PATCH 6/7] mm/balloon_compaction: use common page ballooning Konstantin Khlebnikov
2014-08-20 15:05   ` Konstantin Khlebnikov
2014-08-20 23:48   ` Rafael Aquini
2014-08-20 23:48     ` Rafael Aquini
2014-08-20 15:05 ` [PATCH 7/7] mm/balloon_compaction: general cleanup Konstantin Khlebnikov
2014-08-20 15:05   ` Konstantin Khlebnikov
     [not found]   ` <5ad4664811559496e563ead974f10e8ee6b4ed47.1408576903.git.aquini@redhat.com>
2014-08-20 23:58     ` Rafael Aquini
2014-08-20 23:58       ` Rafael Aquini
2014-08-21  7:30       ` Konstantin Khlebnikov
2014-08-21  7:30         ` Konstantin Khlebnikov
2014-08-21 12:31         ` Rafael Aquini
2014-08-21 12:31           ` Rafael Aquini
2014-08-29 21:05   ` Andrew Morton
2014-08-29 21:05     ` Andrew Morton
2014-08-29 21:09     ` Rafael Aquini
2014-08-29 21:09       ` Rafael Aquini
2014-08-29 21:26       ` Rafael Aquini
2014-08-29 21:26         ` Rafael Aquini
2014-08-29 21:38   ` Andrew Morton
2014-08-29 21:38     ` Andrew Morton
2014-08-30  6:44     ` Konstantin Khlebnikov
2014-08-30  6:44       ` Konstantin Khlebnikov
2014-08-30 16:36       ` [PATCH] mm: rename "migrate_page" to "generic_migrate_page" Konstantin Khlebnikov
2014-08-30 16:36         ` Konstantin Khlebnikov
2014-08-20 23:32 ` [PATCH 1/7] mm/balloon_compaction: ignore anonymous pages Rafael Aquini
2014-08-20 23:32   ` Rafael Aquini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.