page_alloc.c (03e92a5e097d679acbd1fb4d2ae238a38158aa0b) page_alloc.c (77bc7fd607dee2ffb28daff6d0dd8ae42af61ea8)
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * linux/mm/page_alloc.c
4 *
5 * Manages the free list, the system allocates free pages here.
6 * Note that kmalloc() lives in slab.c
7 *
8 * Copyright (C) 1991, 1992, 1993, 1994 Linus Torvalds

--- 1259 unchanged lines hidden (view full) ---

1268 kernel_poison_pages(page, 1 << order, 0);
1269 /*
1270 * arch_free_page() can make the page's contents inaccessible. s390
1271 * does this. So nothing which can access the page's contents should
1272 * happen after this.
1273 */
1274 arch_free_page(page, order);
1275
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * linux/mm/page_alloc.c
4 *
5 * Manages the free list, the system allocates free pages here.
6 * Note that kmalloc() lives in slab.c
7 *
8 * Copyright (C) 1991, 1992, 1993, 1994 Linus Torvalds

--- 1259 unchanged lines hidden (view full) ---

1268 kernel_poison_pages(page, 1 << order, 0);
1269 /*
1270 * arch_free_page() can make the page's contents inaccessible. s390
1271 * does this. So nothing which can access the page's contents should
1272 * happen after this.
1273 */
1274 arch_free_page(page, order);
1275
1276 if (debug_pagealloc_enabled_static())
1277 kernel_map_pages(page, 1 << order, 0);
1276 debug_pagealloc_unmap_pages(page, 1 << order);
1278
1279 kasan_free_nondeferred_pages(page, order);
1280
1281 return true;
1282}
1283
1284#ifdef CONFIG_DEBUG_VM
1285/*

--- 988 unchanged lines hidden (view full) ---

2274
2275inline void post_alloc_hook(struct page *page, unsigned int order,
2276 gfp_t gfp_flags)
2277{
2278 set_page_private(page, 0);
2279 set_page_refcounted(page);
2280
2281 arch_alloc_page(page, order);
1277
1278 kasan_free_nondeferred_pages(page, order);
1279
1280 return true;
1281}
1282
1283#ifdef CONFIG_DEBUG_VM
1284/*

--- 988 unchanged lines hidden (view full) ---

2273
2274inline void post_alloc_hook(struct page *page, unsigned int order,
2275 gfp_t gfp_flags)
2276{
2277 set_page_private(page, 0);
2278 set_page_refcounted(page);
2279
2280 arch_alloc_page(page, order);
2282 if (debug_pagealloc_enabled_static())
2283 kernel_map_pages(page, 1 << order, 1);
2281 debug_pagealloc_map_pages(page, 1 << order);
2284 kasan_alloc_pages(page, order);
2285 kernel_poison_pages(page, 1 << order, 1);
2286 set_page_owner(page, order, gfp_flags);
2287}
2288
2289static void prep_new_page(struct page *page, unsigned int order, gfp_t gfp_flags,
2290 unsigned int alloc_flags)
2291{

--- 6611 unchanged lines hidden ---
2282 kasan_alloc_pages(page, order);
2283 kernel_poison_pages(page, 1 << order, 1);
2284 set_page_owner(page, order, gfp_flags);
2285}
2286
2287static void prep_new_page(struct page *page, unsigned int order, gfp_t gfp_flags,
2288 unsigned int alloc_flags)
2289{

--- 6611 unchanged lines hidden ---