Linux NFS development
 help / color / mirror / Atom feed
From: Jeff Layton <jeff.layton@primarydata.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: bfields@fieldses.org, linux-nfs@vger.kernel.org
Subject: Re: [PATCH] nfsd: silence sparse warning about accessing credentials
Date: Tue, 15 Jul 2014 12:58:21 -0400	[thread overview]
Message-ID: <20140715125821.5fc2ad42@tlielax.poochiereds.net> (raw)
In-Reply-To: <20140715164527.GA9127@infradead.org>

On Tue, 15 Jul 2014 09:45:27 -0700
Christoph Hellwig <hch@infradead.org> wrote:

> On Tue, Jul 15, 2014 at 06:28:54AM -0400, Jeff Layton wrote:
> > sparse says:
> > 
> >     fs/nfsd/auth.c:31:38: warning: incorrect type in argument 1 (different address spaces)
> >     fs/nfsd/auth.c:31:38:    expected struct cred const *cred
> >     fs/nfsd/auth.c:31:38:    got struct cred const [noderef] <asn:4>*real_cred
> > 
> > Add a new accessor for the ->real_cred and use that to fetch the
> > pointer. Accessing current->real_cred directly is actually quite safe
> > since we know that they can't go away so this is mostly a cosmetic fixup
> > to silence sparse.
> 
> This looks reasonable, but I'd suggest Ccing linux-kernel for changes to
> global headers.
> 
> Reviewed-by: Christoph Hellwig <hch@lst.de>

Ok, good point. I'll resend and cc there.

FWIW, I also sent a patch to linux-sparse today which will silence the
last sparse warning when building nfsd.ko.

Thanks,
-- 
Jeff Layton <jlayton@primarydata.com>

  reply	other threads:[~2014-07-15 16:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-15 10:28 [PATCH] nfsd: silence sparse warning about accessing credentials Jeff Layton
2014-07-15 16:45 ` Christoph Hellwig
2014-07-15 16:58   ` Jeff Layton [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-07-15 16:59 Jeff Layton
2014-07-17 20:16 ` 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=20140715125821.5fc2ad42@tlielax.poochiereds.net \
    --to=jeff.layton@primarydata.com \
    --cc=bfields@fieldses.org \
    --cc=hch@infradead.org \
    --cc=linux-nfs@vger.kernel.org \
    /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