mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] SUNRPC: Increase size of servername string
@ 2022-03-24  6:32 Haowen Bai
  2022-03-25  2:06 ` NeilBrown
  0 siblings, 1 reply; 4+ messages in thread
From: Haowen Bai @ 2022-03-24  6:32 UTC (permalink / raw)
  To: trond.myklebust, anna, chuck.lever, davem, kuba, pabeni
  Cc: linux-nfs, netdev, linux-kernel, Haowen Bai

This patch will fix the warning from smatch:

net/sunrpc/clnt.c:562 rpc_create() error: snprintf() chops off
the last chars of 'sun->sun_path': 108 vs 48

Signed-off-by: Haowen Bai <baihaowen@meizu.com>
---
 net/sunrpc/clnt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index c83fe61..6e0209e 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -526,7 +526,7 @@ struct rpc_clnt *rpc_create(struct rpc_create_args *args)
 		.servername = args->servername,
 		.bc_xprt = args->bc_xprt,
 	};
-	char servername[48];
+	char servername[108];
 	struct rpc_clnt *clnt;
 	int i;
 
-- 
2.7.4


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-03-25  7:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-24  6:32 [PATCH] SUNRPC: Increase size of servername string Haowen Bai
2022-03-25  2:06 ` NeilBrown
2022-03-25  6:52   ` David Laight
2022-03-25  7:03     ` David Laight

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®