diff mbox series

net/handshake: Squelch allocation warning during Kunit test

Message ID 168450889814.157177.678686730886780464.stgit@oracle-102.nfsv4bat.org (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series net/handshake: Squelch allocation warning during Kunit test | expand

Checks

Context Check Description
netdev/series_format warning Single patches do not need cover letters; Target tree name not specified in the subject
netdev/tree_selection success Guessed tree name to be net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 10 this patch: 10
netdev/cc_maintainers fail 1 blamed authors not CCed: kuba@kernel.org; 4 maintainers not CCed: kuba@kernel.org edumazet@google.com davem@davemloft.net pabeni@redhat.com
netdev/build_clang success Errors and warnings before: 8 this patch: 8
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 10 this patch: 10
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 9 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Chuck Lever May 19, 2023, 3:09 p.m. UTC
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(-)

I sent this fix to the reporter last week, but haven't posted it to
netdev@ yet.

Comments

Paolo Abeni May 19, 2023, 3:42 p.m. UTC | #1
On Fri, 2023-05-19 at 11:09 -0400, Chuck Lever wrote:
> 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.

Should such flag being added to the relevant entry in
handshake_req_alloc_params?

Thanks!

Paolo
diff mbox series

Patch

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;