diff options
author | 2021-06-07 21:02:36 +0200 | |
---|---|---|
committer | 2021-06-07 14:11:47 -0700 | |
commit | c07aea3ef4d4076f18f567b98ed01e082e02ed51 (patch) | |
tree | f52beca6a7fefeb1f14f7fb92efa914a3682b86f /include/linux/poison.h | |
parent | net: moxa: Use devm_platform_get_and_ioremap_resource() (diff) | |
download | linux-c07aea3ef4d4076f18f567b98ed01e082e02ed51.tar.gz linux-c07aea3ef4d4076f18f567b98ed01e082e02ed51.tar.bz2 linux-c07aea3ef4d4076f18f567b98ed01e082e02ed51.zip |
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>
Diffstat (limited to 'include/linux/poison.h')
-rw-r--r-- | include/linux/poison.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/poison.h b/include/linux/poison.h index aff1c9250c82..d62ef5a6b4e9 100644 --- a/include/linux/poison.h +++ b/include/linux/poison.h @@ -78,4 +78,7 @@ /********** security/ **********/ #define KEY_DESTROY 0xbd +/********** net/core/page_pool.c **********/ +#define PP_SIGNATURE (0x40 + POISON_POINTER_DELTA) + #endif |