All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chuck Lever <chuck.lever@oracle.com>
To: Neil Brown <neilb@suse.de>
Cc: bfields@fieldses.org, nfs@lists.sourceforge.net,
	trond.myklebust@fys.uio.no
Subject: Re: [PATCH 1/8] SUNRPC: Use unsigned string lengths in	xdr_decode_string_inplace
Date: Fri, 02 Nov 2007 12:58:50 -0400	[thread overview]
Message-ID: <472B574A.9040403@oracle.com> (raw)
In-Reply-To: <18218.24424.760975.221813@notabene.brown>

[-- Attachment #1: Type: text/plain, Size: 837 bytes --]

Neil Brown wrote:
> Thanks Chuck.
> This series all:
>    Acked-By: NeilBrown <neilb@suse.de>
> 
> Just one question:
> 
>> diff --git a/net/sunrpc/xdr.c b/net/sunrpc/xdr.c
>> index fdc5e6d..31bd346 100644
>> --- a/net/sunrpc/xdr.c
>> +++ b/net/sunrpc/xdr.c
>> @@ -93,11 +93,13 @@ xdr_encode_string(__be32 *p, const char *string)
>>  }
>>  
>>  __be32 *
>> -xdr_decode_string_inplace(__be32 *p, char **sp, int *lenp, int maxlen)
>> +xdr_decode_string_inplace(__be32 *p, char **sp,
>> +			  unsigned int *lenp, unsigned int maxlen)
>>  {
>> -	unsigned int	len;
>> +	u32 len;
> 
> What is the reason for making this a u32?  You seem to be happy with
> "unsigned int" everywhere else.
> 
> It's not important, but I'm curious.

It boils down to documenting exactly what comes off the wire, 
independent of what the local "unsigned int" is.

[-- Attachment #2: chuck.lever.vcf --]
[-- Type: text/x-vcard, Size: 259 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
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: 314 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-11-02 17:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-01 20:56 [PATCH 1/8] SUNRPC: Use unsigned string lengths in xdr_decode_string_inplace Chuck Lever
2007-11-01 23:21 ` Neil Brown
2007-11-02 16:58   ` Chuck Lever [this message]

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=472B574A.9040403@oracle.com \
    --to=chuck.lever@oracle.com \
    --cc=bfields@fieldses.org \
    --cc=neilb@suse.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.