Linux NFS development
 help / color / mirror / Atom feed
From: Chuck Lever <chuck.lever@oracle.com>
To: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: nfs@lists.sourceforge.net
Subject: Re: [PATCH] NFS: fix length computation in	nfs_validate_mount_data
Date: Wed, 29 Aug 2007 17:06:06 -0400	[thread overview]
Message-ID: <46D5DFBE.6030506@oracle.com> (raw)
In-Reply-To: <1188420008.6580.126.camel@heimdal.trondhjem.org>

[-- 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

  reply	other threads:[~2007-08-29 21:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2007-08-29 21:10       ` Trond Myklebust
2007-08-29 20:56   ` James Lentini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46D5DFBE.6030506@oracle.com \
    --to=chuck.lever@oracle.com \
    --cc=nfs@lists.sourceforge.net \
    --cc=trond.myklebust@fys.uio.no \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox