linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Anna Schumaker <anna.schumaker@netapp.com>
To: Colin Ian King <colin.king@canonical.com>
Cc: Trond Myklebust <trond.myklebust@hammerspace.com>,
	"J . Bruce Fields" <bfields@fieldses.org>,
	Chuck Lever <chuck.lever@oracle.com>,
	"David S . Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Linux NFS Mailing List <linux-nfs@vger.kernel.org>,
	netdev@vger.kernel.org, kernel-janitors@vger.kernel.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] xprtrdma: fix incorrect header size calcations
Date: Wed, 15 Jul 2020 12:40:18 -0400	[thread overview]
Message-ID: <CAFX2Jfn75a8XENoqvztVnUe0aR9S2KGjpcGp3zyLeFS-h--9ag@mail.gmail.com> (raw)
In-Reply-To: <eb5d2ead-807b-3435-5024-b8cc4a1311f3@canonical.com>

No need for a v2, I can fix it up!


On Wed, Jul 15, 2020 at 12:32 PM Colin Ian King
<colin.king@canonical.com> wrote:
>
> Bah, $SUBJECT typo "calcations" -> "calculations". can that be fixed up
> when it's applied, or shall I send a V2?
>
> On 15/07/2020 17:26, Colin King wrote:
> > From: Colin Ian King <colin.king@canonical.com>
> >
> > Currently the header size calculations are using an assignment
> > operator instead of a += operator when accumulating the header
> > size leading to incorrect sizes.  Fix this by using the correct
> > operator.
> >
> > Addresses-Coverity: ("Unused value")
> > Fixes: 302d3deb2068 ("xprtrdma: Prevent inline overflow")
> > Signed-off-by: Colin Ian King <colin.king@canonical.com>
> > ---
> >  net/sunrpc/xprtrdma/rpc_rdma.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/net/sunrpc/xprtrdma/rpc_rdma.c b/net/sunrpc/xprtrdma/rpc_rdma.c
> > index 935bbef2f7be..453bacc99907 100644
> > --- a/net/sunrpc/xprtrdma/rpc_rdma.c
> > +++ b/net/sunrpc/xprtrdma/rpc_rdma.c
> > @@ -71,7 +71,7 @@ static unsigned int rpcrdma_max_call_header_size(unsigned int maxsegs)
> >       size = RPCRDMA_HDRLEN_MIN;
> >
> >       /* Maximum Read list size */
> > -     size = maxsegs * rpcrdma_readchunk_maxsz * sizeof(__be32);
> > +     size += maxsegs * rpcrdma_readchunk_maxsz * sizeof(__be32);
> >
> >       /* Minimal Read chunk size */
> >       size += sizeof(__be32); /* segment count */
> > @@ -94,7 +94,7 @@ static unsigned int rpcrdma_max_reply_header_size(unsigned int maxsegs)
> >       size = RPCRDMA_HDRLEN_MIN;
> >
> >       /* Maximum Write list size */
> > -     size = sizeof(__be32);          /* segment count */
> > +     size += sizeof(__be32);         /* segment count */
> >       size += maxsegs * rpcrdma_segment_maxsz * sizeof(__be32);
> >       size += sizeof(__be32); /* list discriminator */
> >
> >
>

      parent reply	other threads:[~2020-07-15 16:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-15 16:26 [PATCH] xprtrdma: fix incorrect header size calcations Colin King
2020-07-15 16:31 ` Colin Ian King
2020-07-15 16:39   ` Chuck Lever
2020-07-15 16:40   ` Anna Schumaker [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=CAFX2Jfn75a8XENoqvztVnUe0aR9S2KGjpcGp3zyLeFS-h--9ag@mail.gmail.com \
    --to=anna.schumaker@netapp.com \
    --cc=bfields@fieldses.org \
    --cc=chuck.lever@oracle.com \
    --cc=colin.king@canonical.com \
    --cc=davem@davemloft.net \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=trond.myklebust@hammerspace.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).