From: Dan Carpenter <dan.carpenter@oracle.com>
To: Trond.Myklebust@netapp.com
Cc: linux-nfs@vger.kernel.org
Subject: re: SUNRPC: Convert auth_gss pipe detection to work in namespaces
Date: Thu, 16 May 2013 15:31:57 +0300 [thread overview]
Message-ID: <20130516123156.GA19760@elgon.mountain> (raw)
Hello Trond Myklebust,
The patch 11575f2498f5: "SUNRPC: Convert auth_gss pipe detection to
work in namespaces" from May 15, 2013, leads to the following Smatch
warnings:
net/sunrpc/auth_gss/auth_gss.c:275 get_pipe_version() warn: always true condition '(sn->pipe_version >= 0) => (0-u32max >= 0)'"
net/sunrpc/auth_gss/auth_gss.c:732 gss_pipe_open() warn: unsigned 'sn->pipe_version' is never less than zero.
net/sunrpc/auth_gss/auth_gss.c:590 gss_create_upcall() warn: unsigned 'sn->pipe_version' is never less than zero.
net/sunrpc/auth_gss/auth_gss.c
274 spin_lock(&pipe_version_lock);
> 275 if (sn->pipe_version >= 0) {
276 atomic_inc(&sn->pipe_users);
277 ret = sn->pipe_version;
278 } else
279 ret = -EAGAIN;
[snip]
> 590 if (sn->pipe_version < 0) {
591 if (err == 0)
592 sn->gssd_running = 0;
593 warn_gssd();
594 err = -EACCES;
595 }
596 if (err < 0)
597 goto out;
[snip]
731 spin_lock(&pipe_version_lock);
> 732 if (sn->pipe_version < 0) {
733 /* First open of any gss pipe determines the version: */
734 sn->pipe_version = new_version;
735 rpc_wake_up(&pipe_version_rpc_waitqueue);
736 wake_up(&pipe_version_waitqueue);
737 } else if (sn->pipe_version != new_version) {
738 /* Trying to open a pipe of a different version */
739 ret = -EBUSY;
740 goto out;
741 }
regards,
dan carpenter
next reply other threads:[~2013-05-16 12:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-16 12:31 Dan Carpenter [this message]
2013-05-16 13:22 ` SUNRPC: Convert auth_gss pipe detection to work in namespaces Myklebust, Trond
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=20130516123156.GA19760@elgon.mountain \
--to=dan.carpenter@oracle.com \
--cc=Trond.Myklebust@netapp.com \
--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