Skip to contentSkip to conversation

nfs: Fix truncated client owner id without proto type

PATCH New Kinglong Mee 1 participant 1 message Aug 31, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 nfs: Fix truncated client owner id without proto type

The length of "Linux NFSv4.0 " is 14, not 10.

Without this patch, I get a truncated client owner id as, "Linux NFSv4.0 ::1/::1"

With this patch,
"Linux NFSv4.0 ::1/::1 tcp"

Fixex: a319268891 ("nfs: make nfs4_init_nonuniform_client_string use a dynamically allocated buffer")

---
 fs/nfs/nfs4proc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/nfs/nfs4proc.c +1 -1
index 3acb1eb..b7d1bc0 100644
@@ -4984,7 +4984,7 @@ nfs4_init_nonuniform_client_string(struct nfs_client *clp)
 		return 0;
 retry:
 	rcu_read_lock();
-	len = 10 + strlen(clp->cl_ipaddr) + 1 +
+	len = 14 + strlen(clp->cl_ipaddr) + 1 +
 		strlen(rpc_peeraddr2str(clp->cl_rpcclient, RPC_DISPLAY_ADDR)) +
 		1 +
 		strlen(rpc_peeraddr2str(clp->cl_rpcclient, RPC_DISPLAY_PROTO)) +
Signature · 1 line
2.4.3