* [PATCH] NFS: fix length computation in nfs_validate_mount_data
@ 2007-08-29 19:26 James Lentini
2007-08-29 20:30 ` Chuck Lever
0 siblings, 1 reply; 6+ messages in thread
From: James Lentini @ 2007-08-29 19:26 UTC (permalink / raw)
To: trond.myklebust; +Cc: nfs
While experimenting with the new string mount infrastructure, I
noticed an off by one error in the computation of the hostname's
length. This patch fixes the length computation to match the same
computation in nfs4_validate_mount_data().
Signed-off-by: James Lentini <jlentini@netapp.com>
---
fs/nfs/super.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- fs/nfs/super.c 2007-08-29 15:06:59.320932000 -0400
+++ fs/nfs/super.c 2007-08-29 15:07:51.439960000 -0400
@@ -1153,7 +1153,7 @@ static int nfs_validate_mount_data(struc
c = strchr(dev_name, ':');
if (c == NULL)
return -EINVAL;
- len = c - dev_name - 1;
+ len = c - dev_name;
if (len > sizeof(data->hostname))
return -EINVAL;
strncpy(data->hostname, dev_name, len);
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] NFS: fix length computation in nfs_validate_mount_data
2007-08-29 19:26 [PATCH] NFS: fix length computation in nfs_validate_mount_data James Lentini
@ 2007-08-29 20:30 ` Chuck Lever
2007-08-29 20:40 ` Trond Myklebust
2007-08-29 20:56 ` James Lentini
0 siblings, 2 replies; 6+ messages in thread
From: Chuck Lever @ 2007-08-29 20:30 UTC (permalink / raw)
To: James Lentini; +Cc: nfs, trond.myklebust
[-- Attachment #1: Type: text/plain, Size: 927 bytes --]
Yep, this is the same fix as one provided in the clean-up/bug-fix
patches I just resent today.
James Lentini wrote:
> While experimenting with the new string mount infrastructure, I
> noticed an off by one error in the computation of the hostname's
> length. This patch fixes the length computation to match the same
> computation in nfs4_validate_mount_data().
>
> Signed-off-by: James Lentini <jlentini@netapp.com>
> ---
>
> fs/nfs/super.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- fs/nfs/super.c 2007-08-29 15:06:59.320932000 -0400
> +++ fs/nfs/super.c 2007-08-29 15:07:51.439960000 -0400
> @@ -1153,7 +1153,7 @@ static int nfs_validate_mount_data(struc
> c = strchr(dev_name, ':');
> if (c == NULL)
> return -EINVAL;
> - len = c - dev_name - 1;
> + len = c - dev_name;
> if (len > sizeof(data->hostname))
> return -EINVAL;
> strncpy(data->hostname, dev_name, len);
[-- Attachment #2: chuck.lever.vcf --]
[-- Type: text/x-vcard, Size: 315 bytes --]
begin:vcard
fn:Chuck Lever
n:Lever;Chuck
org:Oracle Corporation;Corporate Architecture: Linux Projects Group
adr:;;1015 Granger Avenue;Ann Arbor;MI;48104;USA
email;internet:chuck dot lever at nospam oracle dot com
title:Principal Member of Staff
tel;work:+1 248 614 5091
x-mozilla-html:FALSE
version:2.1
end:vcard
[-- Attachment #3: Type: text/plain, Size: 315 bytes --]
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
[-- Attachment #4: Type: text/plain, Size: 140 bytes --]
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] NFS: fix length computation in nfs_validate_mount_data
2007-08-29 20:30 ` Chuck Lever
@ 2007-08-29 20:40 ` Trond Myklebust
2007-08-29 21:06 ` Chuck Lever
2007-08-29 20:56 ` James Lentini
1 sibling, 1 reply; 6+ messages in thread
From: Trond Myklebust @ 2007-08-29 20:40 UTC (permalink / raw)
To: chuck.lever; +Cc: nfs
On Wed, 2007-08-29 at 16:30 -0400, Chuck Lever wrote:
> Yep, this is the same fix as one provided in the clean-up/bug-fix
> patches I just resent today.
Sure, but we shouldn't be sending pure cleanups to Linus when we're
already in an -rc4 release. OTOH, I'd like to fix genuine bugs like
this, so I'll probably send in James' patch for now, and then let the
cleanups lie until the 2.6.24 merge window opens.
Cheers
Trond
> James Lentini wrote:
> > While experimenting with the new string mount infrastructure, I
> > noticed an off by one error in the computation of the hostname's
> > length. This patch fixes the length computation to match the same
> > computation in nfs4_validate_mount_data().
> >
> > Signed-off-by: James Lentini <jlentini@netapp.com>
> > ---
> >
> > fs/nfs/super.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > --- fs/nfs/super.c 2007-08-29 15:06:59.320932000 -0400
> > +++ fs/nfs/super.c 2007-08-29 15:07:51.439960000 -0400
> > @@ -1153,7 +1153,7 @@ static int nfs_validate_mount_data(struc
> > c = strchr(dev_name, ':');
> > if (c == NULL)
> > return -EINVAL;
> > - len = c - dev_name - 1;
> > + len = c - dev_name;
> > if (len > sizeof(data->hostname))
> > return -EINVAL;
> > strncpy(data->hostname, dev_name, len);
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] NFS: fix length computation in nfs_validate_mount_data
2007-08-29 20:30 ` Chuck Lever
2007-08-29 20:40 ` Trond Myklebust
@ 2007-08-29 20:56 ` James Lentini
1 sibling, 0 replies; 6+ messages in thread
From: James Lentini @ 2007-08-29 20:56 UTC (permalink / raw)
To: Chuck Lever; +Cc: nfs, trond.myklebust
Agreed. I didn't notice this in your patches.
On Wed, 29 Aug 2007, Chuck Lever wrote:
> Yep, this is the same fix as one provided in the clean-up/bug-fix patches I
> just resent today.
>
>
> James Lentini wrote:
> > While experimenting with the new string mount infrastructure, I noticed an
> > off by one error in the computation of the hostname's length. This patch
> > fixes the length computation to match the same computation in
> > nfs4_validate_mount_data().
> >
> > Signed-off-by: James Lentini <jlentini@netapp.com>
> > ---
> >
> > fs/nfs/super.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > --- fs/nfs/super.c 2007-08-29 15:06:59.320932000 -0400
> > +++ fs/nfs/super.c 2007-08-29 15:07:51.439960000 -0400
> > @@ -1153,7 +1153,7 @@ static int nfs_validate_mount_data(struc
> > c = strchr(dev_name, ':');
> > if (c == NULL)
> > return -EINVAL;
> > - len = c - dev_name - 1;
> > + len = c - dev_name;
> > if (len > sizeof(data->hostname))
> > return -EINVAL;
> > strncpy(data->hostname, dev_name, len);
>
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] NFS: fix length computation in nfs_validate_mount_data
2007-08-29 20:40 ` Trond Myklebust
@ 2007-08-29 21:06 ` Chuck Lever
2007-08-29 21:10 ` Trond Myklebust
0 siblings, 1 reply; 6+ messages in thread
From: Chuck Lever @ 2007-08-29 21:06 UTC (permalink / raw)
To: Trond Myklebust; +Cc: nfs
[-- Attachment #1: Type: text/plain, Size: 1592 bytes --]
Trond Myklebust wrote:
> On Wed, 2007-08-29 at 16:30 -0400, Chuck Lever wrote:
>> Yep, this is the same fix as one provided in the clean-up/bug-fix
>> patches I just resent today.
>
> Sure, but we shouldn't be sending pure cleanups to Linus when we're
> already in an -rc4 release. OTOH, I'd like to fix genuine bugs like
> this, so I'll probably send in James' patch for now, and then let the
> cleanups lie until the 2.6.24 merge window opens.
Bruce already (sternly) lectured me on this.
These are not just clean-ups. They really are bug-fixes for the API.
I'm sorry I didn't recognize the semantic distinction in the patch
description.
As Tom said, these really are needed to make the interface useful.
>> James Lentini wrote:
>>> While experimenting with the new string mount infrastructure, I
>>> noticed an off by one error in the computation of the hostname's
>>> length. This patch fixes the length computation to match the same
>>> computation in nfs4_validate_mount_data().
>>>
>>> Signed-off-by: James Lentini <jlentini@netapp.com>
>>> ---
>>>
>>> fs/nfs/super.c | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> --- fs/nfs/super.c 2007-08-29 15:06:59.320932000 -0400
>>> +++ fs/nfs/super.c 2007-08-29 15:07:51.439960000 -0400
>>> @@ -1153,7 +1153,7 @@ static int nfs_validate_mount_data(struc
>>> c = strchr(dev_name, ':');
>>> if (c == NULL)
>>> return -EINVAL;
>>> - len = c - dev_name - 1;
>>> + len = c - dev_name;
>>> if (len > sizeof(data->hostname))
>>> return -EINVAL;
>>> strncpy(data->hostname, dev_name, len);
>
[-- Attachment #2: chuck.lever.vcf --]
[-- Type: text/x-vcard, Size: 315 bytes --]
begin:vcard
fn:Chuck Lever
n:Lever;Chuck
org:Oracle Corporation;Corporate Architecture: Linux Projects Group
adr:;;1015 Granger Avenue;Ann Arbor;MI;48104;USA
email;internet:chuck dot lever at nospam oracle dot com
title:Principal Member of Staff
tel;work:+1 248 614 5091
x-mozilla-html:FALSE
version:2.1
end:vcard
[-- Attachment #3: Type: text/plain, Size: 315 bytes --]
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
[-- Attachment #4: Type: text/plain, Size: 140 bytes --]
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] NFS: fix length computation in nfs_validate_mount_data
2007-08-29 21:06 ` Chuck Lever
@ 2007-08-29 21:10 ` Trond Myklebust
0 siblings, 0 replies; 6+ messages in thread
From: Trond Myklebust @ 2007-08-29 21:10 UTC (permalink / raw)
To: chuck.lever; +Cc: nfs
On Wed, 2007-08-29 at 17:06 -0400, Chuck Lever wrote:
> These are not just clean-ups. They really are bug-fixes for the API.
> I'm sorry I didn't recognize the semantic distinction in the patch
> description.
>
> As Tom said, these really are needed to make the interface useful.
Could you in that case, please correct the changelog entries (pointing
out exactly which bugs/interface flaws are being fixed), and resend.
Cheers
Trond
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-08-29 21:10 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-29 19:26 [PATCH] NFS: fix length computation in nfs_validate_mount_data James Lentini
2007-08-29 20:30 ` Chuck Lever
2007-08-29 20:40 ` Trond Myklebust
2007-08-29 21:06 ` Chuck Lever
2007-08-29 21:10 ` Trond Myklebust
2007-08-29 20:56 ` James Lentini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox