linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pnfsd: Prevent ipv6 address truncation in /proc/fs/nfsd/pnfs_dlm_device
@ 2011-05-31 18:19 Michael Groshans
  2011-06-01 13:52 ` Benny Halevy
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Groshans @ 2011-05-31 18:19 UTC (permalink / raw)
  To: linux-nfs

From: Michael Groshans <groshans@umich.edu>

ipv6 addresses in /proc/fs/nfsd/pnfs_dlm_device were being truncated because the
length was determined by looking for the next colon. Changed to use strlen()
instead.

Signed-off by: Michael Groshans <groshans@umich.edu>
---
 fs/nfsd/nfs4pnfsdlm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/nfsd/nfs4pnfsdlm.c b/fs/nfsd/nfs4pnfsdlm.c
index 006ded5..0068ba0 100644
--- a/fs/nfsd/nfs4pnfsdlm.c
+++ b/fs/nfsd/nfs4pnfsdlm.c
@@ -165,7 +165,7 @@ nfsd4_set_pnfs_dlm_device(char *pnfs_dlm_device, int len)
 
 	/* data server list */
 	/* FIXME: need to check for comma separated valid ip format */
-	len = strcspn(bufp, ":");
+	len = strlen(bufp);
 	if (len > NFSD_DLM_DS_LIST_MAX)
 		goto out_free;
 	memcpy(new->ds_list, bufp, len);
-- 
1.7.3.4

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

* Re: [PATCH] pnfsd: Prevent ipv6 address truncation in /proc/fs/nfsd/pnfs_dlm_device
  2011-05-31 18:19 [PATCH] pnfsd: Prevent ipv6 address truncation in /proc/fs/nfsd/pnfs_dlm_device Michael Groshans
@ 2011-06-01 13:52 ` Benny Halevy
  0 siblings, 0 replies; 2+ messages in thread
From: Benny Halevy @ 2011-06-01 13:52 UTC (permalink / raw)
  To: Michael Groshans; +Cc: linux-nfs

On 2011-05-31 21:19, Michael Groshans wrote:
> From: Michael Groshans <groshans@umich.edu>
> 
> ipv6 addresses in /proc/fs/nfsd/pnfs_dlm_device were being truncated because the
> length was determined by looking for the next colon. Changed to use strlen()
> instead.
> 
> Signed-off by: Michael Groshans <groshans@umich.edu>

All 3 patches look good to me.
For easier patch management, next time it would be good
to send all three as replies to an introductory message,

Also, please use "Signed-off-by:" rather than "Signed-off by:".
Besides the fact that checkpatch warns about that I'm not sure
it gets tracked properly...
I'll fix that before committing.

Thanks!

Benny

> ---
>  fs/nfsd/nfs4pnfsdlm.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/fs/nfsd/nfs4pnfsdlm.c b/fs/nfsd/nfs4pnfsdlm.c
> index 006ded5..0068ba0 100644
> --- a/fs/nfsd/nfs4pnfsdlm.c
> +++ b/fs/nfsd/nfs4pnfsdlm.c
> @@ -165,7 +165,7 @@ nfsd4_set_pnfs_dlm_device(char *pnfs_dlm_device, int len)
>  
>  	/* data server list */
>  	/* FIXME: need to check for comma separated valid ip format */
> -	len = strcspn(bufp, ":");
> +	len = strlen(bufp);
>  	if (len > NFSD_DLM_DS_LIST_MAX)
>  		goto out_free;
>  	memcpy(new->ds_list, bufp, len);


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

end of thread, other threads:[~2011-06-01 13:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-31 18:19 [PATCH] pnfsd: Prevent ipv6 address truncation in /proc/fs/nfsd/pnfs_dlm_device Michael Groshans
2011-06-01 13:52 ` Benny Halevy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).