linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Tom Tucker <tom@ogc.us>,
	trond.myklebust@netapp.com, dan.carpenter@oracle.com,
	linux-nfs@vger.kernel.org, steved@redhat.com
Subject: Re: [PATCH] svcrdma: Cleanup sparse warnings in the svcrdma module
Date: Wed, 15 Feb 2012 11:16:25 -0500	[thread overview]
Message-ID: <20120215161625.GC12490@fieldses.org> (raw)
In-Reply-To: <20120214232342.GB23916@ZenIV.linux.org.uk>

OK, Tom could you fix up these small things and repost?

--b.

On Tue, Feb 14, 2012 at 11:23:42PM +0000, Al Viro wrote:
> On Tue, Feb 14, 2012 at 05:01:25PM -0600, Tom Tucker wrote:
> 
> > -	if (ch->rc_discrim == 0)
> > +	if (ch->rc_discrim == xdr_zero)
> 
> Mostly, ACK, modulo this and similar sillyness.  sparse is just fine with
> use of constant 0 in bitwise contexts; it's also just fine with use of
> bitwise in logical ones.
> 
> > +	nchunks = ntohl(ary->wc_nchunks);
> >  	if (((unsigned long)&ary->wc_array[0] +
> > -	     (sizeof(struct rpcrdma_write_chunk) * ary->wc_nchunks)) >
> > +	     (sizeof(struct rpcrdma_write_chunk) * nchunks)) >
> 
> BTW, this still can overflow.  With less painful consequences than before that
> patch, but...
> 
> > -			BUG_ON(0 == virt_to_page(vec[i].iov_base));
> > +			BUG_ON(NULL == virt_to_page(vec[i].iov_base));
> 
> Egads...  What, "!virt_to_page(...)" would have been too pedestrian?

  reply	other threads:[~2012-02-15 16:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-14 23:01 [PATCH] svcrdma: Cleanup sparse warnings in the svcrdma module Tom Tucker
2012-02-14 23:23 ` Al Viro
2012-02-15 16:16   ` J. Bruce Fields [this message]
2012-02-15 17:09     ` Tom Tucker
2012-02-15 19:03       ` J. Bruce Fields
2012-02-15 17:25     ` [PATCHv2] " Tom Tucker
2012-02-15 17:31       ` Tom Tucker
2012-02-15 17:30     ` [PATCHv3] " Tom Tucker
2012-02-17 22:01       ` J. Bruce Fields

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=20120215161625.GC12490@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=dan.carpenter@oracle.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=steved@redhat.com \
    --cc=tom@ogc.us \
    --cc=trond.myklebust@netapp.com \
    --cc=viro@ZenIV.linux.org.uk \
    /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).