]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm: avoid false-positive PageTail() during meminit
authorKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Wed, 21 Oct 2015 22:03:30 +0000 (09:03 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 21 Oct 2015 22:03:30 +0000 (09:03 +1100)
commit220fa6e6ed4ee1e6b9ac5599089601fc9274254d
tree3aaf5c5c7bd04f5075fca2f1425a1fdd3c95063e
parentfda6d23696ee43144123cca608ea3bc617b1b052
mm: avoid false-positive PageTail() during meminit

Since compound_head() rework we encode PageTail() into bit 0 of
page->lru.next (aka page->compound_head).  We need to make sure that
page->lru is initialized before first use of compound_head() or
PageTail().

My page-flags patchset makes sure that we don't use PG_reserved on
compound pages.  That means we have PageTail() check as eary as in
SetPageReserved() in reserve_bootmem_region()

Let's initialize page->lru before that to avoid false positive from
PageTail().

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/page_alloc.c