|
@@ -53,6 +53,7 @@
|
|
|
#include <linux/compaction.h>
|
|
|
#include <trace/events/kmem.h>
|
|
|
#include <linux/ftrace_event.h>
|
|
|
+#include <linux/memcontrol.h>
|
|
|
|
|
|
#include <asm/tlbflush.h>
|
|
|
#include <asm/div64.h>
|
|
@@ -565,7 +566,8 @@ static inline int free_pages_check(struct page *page)
|
|
|
if (unlikely(page_mapcount(page) |
|
|
|
(page->mapping != NULL) |
|
|
|
(atomic_read(&page->_count) != 0) |
|
|
|
- (page->flags & PAGE_FLAGS_CHECK_AT_FREE))) {
|
|
|
+ (page->flags & PAGE_FLAGS_CHECK_AT_FREE) |
|
|
|
+ (mem_cgroup_bad_page_check(page)))) {
|
|
|
bad_page(page);
|
|
|
return 1;
|
|
|
}
|
|
@@ -754,7 +756,8 @@ static inline int check_new_page(struct page *page)
|
|
|
if (unlikely(page_mapcount(page) |
|
|
|
(page->mapping != NULL) |
|
|
|
(atomic_read(&page->_count) != 0) |
|
|
|
- (page->flags & PAGE_FLAGS_CHECK_AT_PREP))) {
|
|
|
+ (page->flags & PAGE_FLAGS_CHECK_AT_PREP) |
|
|
|
+ (mem_cgroup_bad_page_check(page)))) {
|
|
|
bad_page(page);
|
|
|
return 1;
|
|
|
}
|
|
@@ -5684,4 +5687,5 @@ void dump_page(struct page *page)
|
|
|
page, atomic_read(&page->_count), page_mapcount(page),
|
|
|
page->mapping, page->index);
|
|
|
dump_page_flags(page->flags);
|
|
|
+ mem_cgroup_print_bad_page(page);
|
|
|
}
|