From: Shuicheng Lin <shuicheng.lin@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: Shuicheng Lin <shuicheng.lin@intel.com>,
Matthew Brost <matthew.brost@intel.com>,
Ashutosh Dixit <ashutosh.dixit@intel.com>
Subject: [PATCH 2/2] drm/xe/oa: Silence allocation warnings for sync arrays
Date: Thu, 20 Nov 2025 23:42:56 +0000 [thread overview]
Message-ID: <20251120234254.427452-6-shuicheng.lin@intel.com> (raw)
In-Reply-To: <20251120234254.427452-4-shuicheng.lin@intel.com>
param->num_syncs comes from userspace and may be large or fuzzed.
When kcalloc() attempts a large allocation, the allocator may emit
noisy warning like below, even though the driver already returns
-ENOMEM safely.
Use __GFP_NOWARN to suppress it.
"
WARNING: CPU: 0 PID: 1217 at mm/page_alloc.c:5124 __alloc_frozen_pages_noprof+0x2f8/0x2180 mm/page_alloc.c:5124
"
Fixes: c8507a25cebd ("drm/xe/oa/uapi: Define and parse OA sync properties")
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Ashutosh Dixit <ashutosh.dixit@intel.com>
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
---
drivers/gpu/drm/xe/xe_oa.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/xe/xe_oa.c b/drivers/gpu/drm/xe/xe_oa.c
index 890c363282ae..4fdba0c62815 100644
--- a/drivers/gpu/drm/xe/xe_oa.c
+++ b/drivers/gpu/drm/xe/xe_oa.c
@@ -1404,7 +1404,8 @@ static int xe_oa_parse_syncs(struct xe_oa *oa,
}
if (param->num_syncs) {
- param->syncs = kcalloc(param->num_syncs, sizeof(*param->syncs), GFP_KERNEL);
+ param->syncs = kcalloc(param->num_syncs, sizeof(*param->syncs),
+ GFP_KERNEL | __GFP_NOWARN);
if (!param->syncs) {
ret = -ENOMEM;
goto exit;
--
2.49.0
next prev parent reply other threads:[~2025-11-20 23:45 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-20 23:42 [PATCH 0/2] Silence allocation warnings for sync arrays Shuicheng Lin
2025-11-20 23:42 ` [PATCH 1/2] drm/xe: " Shuicheng Lin
2025-11-20 23:42 ` Shuicheng Lin [this message]
2025-11-21 1:09 ` ✗ CI.checkpatch: warning for " Patchwork
2025-11-21 1:10 ` ✓ CI.KUnit: success " Patchwork
2025-11-21 1:49 ` ✓ Xe.CI.BAT: " Patchwork
2025-11-21 6:43 ` ✓ Xe.CI.Full: " Patchwork
2025-11-24 11:19 ` [PATCH 0/2] " Thomas Hellström
2025-11-24 17:32 ` Matthew Brost
2025-11-24 21:24 ` Lin, Shuicheng
2025-12-01 16:17 ` Lin, Shuicheng
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=20251120234254.427452-6-shuicheng.lin@intel.com \
--to=shuicheng.lin@intel.com \
--cc=ashutosh.dixit@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.brost@intel.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