[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20120112213210.GR3644@mwanda>
Date: Fri, 13 Jan 2012 00:32:10 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: "J. Bruce Fields" <bfields@...ldses.org>
Cc: Trond Myklebust <Trond.Myklebust@...app.com>,
"David S. Miller" <davem@...emloft.net>, linux-nfs@...r.kernel.org,
netdev@...r.kernel.org, kernel-janitors@...r.kernel.org,
Tom Tucker <tom@...ngridcomputing.com>
Subject: Re: [patch] svcrdma: endian bug in send_write_chunks()
On Thu, Jan 12, 2012 at 11:21:41AM -0500, J. Bruce Fields wrote:
> On Thu, Jan 12, 2012 at 09:47:22AM +0300, Dan Carpenter wrote:
> > Sparse complains because arg_ch->rs_length is declared as network
> > endian but we're treating it as CPU endian.
>
> This looks like it would actually change behavior on a little endian
> architecture, so how did this work before?
>
> >From some quick grepping, I see assignments both of the form
>
> ...rs_length = ntohl(...)
>
> and
>
> ...rs_length = htonl(...)
>
> but only see one declaration for a field named rs_length.
>
> So my best guess would be that the code is ugly but working as is, and
> needs cleanup by someone who knows how this field was intended to be
> used.
Gar. Sorry for that. I knew it changed the behavior, and I tried
to see how the original code worked, but I didn't read carefully
enough. I'll try be more careful next time.
Thanks for catching that.
regards,
dan carpenter
Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)
Powered by blists - more mailing lists