]> git.baikalelectronics.ru Git - kernel.git/commit
mm: add a signature in struct page
authorMatteo Croce <mcroce@microsoft.com>
Mon, 7 Jun 2021 19:02:36 +0000 (21:02 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 7 Jun 2021 21:11:47 +0000 (14:11 -0700)
commit8a20ff88f4b82de869fe267ee0177308fa035ee3
treef52beca6a7fefeb1f14f7fb92efa914a3682b86f
parent987a0a6c6bd9ad57b860dedbf9373fcba2f72a56
mm: add a signature in struct page

This is needed by the page_pool to avoid recycling a page not allocated
via page_pool.

The page->signature field is aliased to page->lru.next and
page->compound_head, but it can't be set by mistake because the
signature value is a bad pointer, and can't trigger a false positive
in PageTail() because the last bit is 0.

Co-developed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Matteo Croce <mcroce@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/mm.h
include/linux/mm_types.h
include/linux/poison.h
net/core/page_pool.c