aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mm/debug.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2016-11-04 12:16:38 -0600
committerMark Brown <broonie@kernel.org>2016-11-04 12:16:38 -0600
commitcc9b94029e9ef51787af908e9856b1eed314bc00 (patch)
tree9675310b89d0f6fb1f7bd9423f0638c4ee5226fd /mm/debug.c
parentregulator: fixed: add support for ACPI interface (diff)
parentregulator: core: Add new API to poll for error conditions (diff)
downloadwireguard-linux-cc9b94029e9ef51787af908e9856b1eed314bc00.tar.xz
wireguard-linux-cc9b94029e9ef51787af908e9856b1eed314bc00.zip
Merge branch 'topic/error' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator into regulator-fixed
Diffstat (limited to 'mm/debug.c')
-rw-r--r--mm/debug.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/mm/debug.c b/mm/debug.c
index 8865bfb41b0b..9feb699c5d25 100644
--- a/mm/debug.c
+++ b/mm/debug.c
@@ -42,9 +42,16 @@ const struct trace_print_flags vmaflag_names[] = {
void __dump_page(struct page *page, const char *reason)
{
+ /*
+ * Avoid VM_BUG_ON() in page_mapcount().
+ * page->_mapcount space in struct page is used by sl[aou]b pages to
+ * encode own info.
+ */
+ int mapcount = PageSlab(page) ? 0 : page_mapcount(page);
+
pr_emerg("page:%p count:%d mapcount:%d mapping:%p index:%#lx",
- page, page_ref_count(page), page_mapcount(page),
- page->mapping, page->index);
+ page, page_ref_count(page), mapcount,
+ page->mapping, page_to_pgoff(page));
if (PageCompound(page))
pr_cont(" compound_mapcount: %d", compound_mapcount(page));
pr_cont("\n");