From: Dan Carpenter <dan.carpenter@oracle.com>
To: "J. Bruce Fields" <bfields@fieldses.org>
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>,
"David S. Miller" <davem@davemloft.net>,
linux-nfs@vger.kernel.org, netdev@vger.kernel.org,
kernel-janitors@vger.kernel.org,
Tom Tucker <tom@opengridcomputing.com>
Subject: Re: [patch] svcrdma: endian bug in send_write_chunks()
Date: Thu, 12 Jan 2012 21:32:10 +0000 [thread overview]
Message-ID: <20120112213210.GR3644@mwanda> (raw)
In-Reply-To: <20120112162141.GC6563@fieldses.org>
[-- Attachment #1: Type: text/plain, Size: 986 bytes --]
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
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: "J. Bruce Fields" <bfields@fieldses.org>
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>,
"David S. Miller" <davem@davemloft.net>,
linux-nfs@vger.kernel.org, netdev@vger.kernel.org,
kernel-janitors@vger.kernel.org,
Tom Tucker <tom@opengridcomputing.com>
Subject: Re: [patch] svcrdma: endian bug in send_write_chunks()
Date: Fri, 13 Jan 2012 00:32:10 +0300 [thread overview]
Message-ID: <20120112213210.GR3644@mwanda> (raw)
In-Reply-To: <20120112162141.GC6563@fieldses.org>
[-- Attachment #1: Type: text/plain, Size: 986 bytes --]
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
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
To: "J. Bruce Fields" <bfields-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org>
Cc: Trond Myklebust
<Trond.Myklebust-HgOvQuBEEgTQT0dZR+AlfA@public.gmane.org>,
"David S. Miller" <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>,
linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
kernel-janitors-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Tom Tucker
<tom-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
Subject: Re: [patch] svcrdma: endian bug in send_write_chunks()
Date: Fri, 13 Jan 2012 00:32:10 +0300 [thread overview]
Message-ID: <20120112213210.GR3644@mwanda> (raw)
In-Reply-To: <20120112162141.GC6563-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 986 bytes --]
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
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2012-01-12 21:32 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-12 6:47 [patch] svcrdma: endian bug in send_write_chunks() Dan Carpenter
2012-01-12 6:47 ` Dan Carpenter
2012-01-12 6:47 ` Dan Carpenter
2012-01-12 16:21 ` J. Bruce Fields
2012-01-12 16:21 ` J. Bruce Fields
2012-01-12 19:15 ` Trond Myklebust
2012-01-12 19:15 ` Trond Myklebust
2012-01-12 19:24 ` Tom Tucker
2012-01-12 19:24 ` Tom Tucker
2012-01-12 19:28 ` Trond Myklebust
2012-01-12 19:28 ` Trond Myklebust
2012-01-12 19:28 ` Trond Myklebust
2012-01-12 19:37 ` Tom Tucker
2012-01-12 19:37 ` Tom Tucker
2012-01-12 19:37 ` Tom Tucker
2012-01-12 19:28 ` J. Bruce Fields
2012-01-12 19:28 ` J. Bruce Fields
2012-01-12 19:28 ` J. Bruce Fields
2012-01-12 21:32 ` Dan Carpenter [this message]
2012-01-12 21:32 ` Dan Carpenter
2012-01-12 21:32 ` Dan Carpenter
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=20120112213210.GR3644@mwanda \
--to=dan.carpenter@oracle.com \
--cc=Trond.Myklebust@netapp.com \
--cc=bfields@fieldses.org \
--cc=davem@davemloft.net \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=tom@opengridcomputing.com \
/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.