aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mm/page_alloc.c
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2022-12-05 09:32:11 +0100
committerArd Biesheuvel <ardb@kernel.org>2022-12-07 19:08:57 +0100
commitd9f26ae731259c8fb2d62a742c64e454996944a8 (patch)
tree08a1d422cf241d256acb7e61cb60a9e0c4782278 /mm/page_alloc.c
parentefi: Put Linux specific magic number in the DOS header (diff)
parentLinux 6.1-rc8 (diff)
downloadwireguard-linux-d9f26ae731259c8fb2d62a742c64e454996944a8.tar.xz
wireguard-linux-d9f26ae731259c8fb2d62a742c64e454996944a8.zip
Merge tag 'v6.1-rc8' into efi/next
Linux 6.1-rc8
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r--mm/page_alloc.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 218b28ee49ed..6e60657875d3 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -3887,6 +3887,8 @@ __setup("fail_page_alloc=", setup_fail_page_alloc);
static bool __should_fail_alloc_page(gfp_t gfp_mask, unsigned int order)
{
+ int flags = 0;
+
if (order < fail_page_alloc.min_order)
return false;
if (gfp_mask & __GFP_NOFAIL)
@@ -3897,10 +3899,11 @@ static bool __should_fail_alloc_page(gfp_t gfp_mask, unsigned int order)
(gfp_mask & __GFP_DIRECT_RECLAIM))
return false;
+ /* See comment in __should_failslab() */
if (gfp_mask & __GFP_NOWARN)
- fail_page_alloc.attr.no_warn = true;
+ flags |= FAULT_NOWARN;
- return should_fail(&fail_page_alloc.attr, 1 << order);
+ return should_fail_ex(&fail_page_alloc.attr, 1 << order, flags);
}
#ifdef CONFIG_FAULT_INJECTION_DEBUG_FS