From: David Heidelberg via B4 Relay <devnull+david.ixit.cz@kernel.org>
To: Andrew Morton <akpm@linux-foundation.org>,
Uladzislau Rezki <urezki@gmail.com>,
"Vishal Moola (Oracle)" <vishal.moola@gmail.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
phone-devel@vger.kernel.org, David Heidelberg <david@ixit.cz>
Subject: [PATCH v2] mm/vmalloc: warn only once when vmalloc detect invalid gfp flags
Date: Tue, 18 Nov 2025 12:37:16 +0100 [thread overview]
Message-ID: <20251118-only-one-vmalloc-v2-1-fe702aa68d8b@ixit.cz> (raw)
From: David Heidelberg <david@ixit.cz>
Without WARN_ONCE, the logs get spammed immediately after the boot,
on devices as OnePlus 6T (Snapdragon 845).
Fixes: 7179b2256315 ("mm/vmalloc: warn on invalid vmalloc gfp flags")
Signed-off-by: David Heidelberg <david@ixit.cz>
---
Resend as requested.
---
Changes in v2:
- Fixed accidentally removed comma.
- Link to v1: https://lore.kernel.org/r/20251118-only-one-vmalloc-v1-1-29f8eacb4605@ixit.cz
---
mm/vmalloc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index 49e0b68768d73..59a4ea8b7f91f 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -3934,8 +3934,8 @@ static gfp_t vmalloc_fix_flags(gfp_t flags)
gfp_t invalid_mask = flags & ~GFP_VMALLOC_SUPPORTED;
flags &= GFP_VMALLOC_SUPPORTED;
- WARN(1, "Unexpected gfp: %#x (%pGg). Fixing up to gfp: %#x (%pGg). Fix your code!\n",
- invalid_mask, &invalid_mask, flags, &flags);
+ WARN_ONCE(1, "Unexpected gfp: %#x (%pGg). Fixing up to gfp: %#x (%pGg). Fix your code!\n",
+ invalid_mask, &invalid_mask, flags, &flags);
return flags;
}
---
base-commit: 0c1c7a6a83feaf2cf182c52983ffe330ffb50280
change-id: 20251118-only-one-vmalloc-b8d997045791
Best regards,
--
David Heidelberg <david@ixit.cz>
next reply other threads:[~2025-11-18 11:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-18 11:37 David Heidelberg via B4 Relay [this message]
2025-11-18 17:12 ` Vishal Moola (Oracle)
2025-11-18 17:27 ` Uladzislau Rezki
2025-11-19 2:00 ` SeongJae Park
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251118-only-one-vmalloc-v2-1-fe702aa68d8b@ixit.cz \
--to=devnull+david.ixit.cz@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=david@ixit.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=phone-devel@vger.kernel.org \
--cc=urezki@gmail.com \
--cc=vishal.moola@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox