[Devel] [PATCH RH8] mm: Fix section mismatch of zero_free_pages
Kirill Tkhai
ktkhai at virtuozzo.com
Wed May 5 14:04:54 MSK 2021
zero_free_pages is used not only from boot code:
WARNING: vmlinux.o(.text+0x21f668): Section mismatch in reference from the function __free_pages_ok() to the variable .init.data:zero_free_pages
The function __free_pages_ok() references
the variable __initdata zero_free_pages.
This is often because __free_pages_ok lacks a __initdata
annotation or the annotation of zero_free_pages is wrong.
Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
mm/page_alloc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index b407f25bb773..fd04c836d7e1 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -156,7 +156,7 @@ static inline void set_pcppage_migratetype(struct page *page, int migratetype)
}
static int zero_data_pages_enabled;
-struct static_key __initdata zero_free_pages = STATIC_KEY_INIT_FALSE;
+struct static_key zero_free_pages = STATIC_KEY_INIT_FALSE;
static int __init enable_zero_free_pages(char *__unused)
{
More information about the Devel
mailing list