[PATCH] mm/hugetl.c: keep the page mapping info when free_huge_page() hit the VM_BUG_ON_PAGE

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

 



It is better to keep page mapping info when free_huge_page() hit the VM_BUG_ON_PAGE,
so we can get more infomation from the coredump for further analysis.

Signed-off-by: Yongkai Wu <nic_w@xxxxxxx>
---
 mm/hugetlb.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index c007fb5..ba693bb 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -1248,10 +1248,11 @@ void free_huge_page(struct page *page)
  (struct hugepage_subpool *)page_private(page);
  bool restore_reserve;
 
+        VM_BUG_ON_PAGE(page_count(page), page);
+        VM_BUG_ON_PAGE(page_mapcount(page), page);
+
  set_page_private(page, 0);
  page->mapping = NULL;
- VM_BUG_ON_PAGE(page_count(page), page);
- VM_BUG_ON_PAGE(page_mapcount(page), page);
  restore_reserve = PagePrivate(page);
  ClearPagePrivate(page);
 
-- 
1.8.3.1

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux