* [PATCH] net/handshake: Squelch allocation warning during Kunit test
@ 2023-05-12 19:02 Chuck Lever
0 siblings, 0 replies; only message in thread
From: Chuck Lever @ 2023-05-12 19:02 UTC (permalink / raw)
To: naresh.kamboju
Cc: linux-kernel, linux-mm, kasan-dev, kunit-dev, lkft-triage, elver,
akpm, mgorman, aryabinin
From: Chuck Lever <chuck.lever@oracle.com>
The "handshake_req_alloc excessive privsize" kunit test is intended
to check what happens when the maximum privsize is exceeded. The
WARN_ON_ONCE_GFP at mm/page_alloc.c:4744 can be disabled safely for
this allocator call site.
Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
Fixes: 88232ec1ec5e ("net/handshake: Add Kunit tests for the handshake consumer API")
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
net/handshake/request.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/handshake/request.c b/net/handshake/request.c
index d78d41abb3d9..24097cccd158 100644
--- a/net/handshake/request.c
+++ b/net/handshake/request.c
@@ -120,7 +120,8 @@ struct handshake_req *handshake_req_alloc(const struct handshake_proto *proto,
if (!proto->hp_accept || !proto->hp_done)
return NULL;
- req = kzalloc(struct_size(req, hr_priv, proto->hp_privsize), flags);
+ req = kzalloc(struct_size(req, hr_priv, proto->hp_privsize),
+ flags | __GFP_NOWARN);
if (!req)
return NULL;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-05-12 19:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-12 19:02 [PATCH] net/handshake: Squelch allocation warning during Kunit test Chuck Lever
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox