提交 f3ca10dd 编写于 作者: L Linus Torvalds

Revert "mm: avoid tail page refcounting on non-THP compound pages"

This reverts commit 8d63d99a.

It causes in VM mapping refcount errors:

  page:ffffea0010a15040 count:0 mapcount:1 mapping:          (null) index:0x0
  flags: 0x8000000000008014(referenced|dirty|tail)
  page dumped because: VM_BUG_ON_PAGE(page_mapcount(page) != 0)
  ------------[ cut here ]------------
  kernel BUG at mm/swap.c:134!

as reported by Borislav Petkov
Reported-and-tested-by: NBorislav Petkov <bp@alien8.de>
Cc: Kirill A. Shutemov <kirill@shutemov.name>
Cc: Hugh Dickins <hughd@google.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 5e6c94a9
......@@ -499,7 +499,7 @@ static inline int page_count(struct page *page)
static inline bool __compound_tail_refcounted(struct page *page)
{
return PageAnon(page) && !PageSlab(page) && !PageHeadHuge(page);
return !PageSlab(page) && !PageHeadHuge(page);
}
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册