* re: SUNRPC: Convert auth_gss pipe detection to work in namespaces
@ 2013-05-16 12:31 Dan Carpenter
2013-05-16 13:22 ` Myklebust, Trond
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2013-05-16 12:31 UTC (permalink / raw)
To: Trond.Myklebust; +Cc: linux-nfs
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: SUNRPC: Convert auth_gss pipe detection to work in namespaces
2013-05-16 12:31 SUNRPC: Convert auth_gss pipe detection to work in namespaces Dan Carpenter
@ 2013-05-16 13:22 ` Myklebust, Trond
0 siblings, 0 replies; 2+ messages in thread
From: Myklebust, Trond @ 2013-05-16 13:22 UTC (permalink / raw)
To: Dan Carpenter; +Cc: linux-nfs@vger.kernel.org
On Thu, 2013-05-16 at 15:31 +0300, Dan Carpenter wrote:
> 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.
Thanks Dan! It's fixed now...
--
Trond Myklebust
Linux NFS client maintainer
NetApp
Trond.Myklebust@netapp.com
www.netapp.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-05-16 13:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-16 12:31 SUNRPC: Convert auth_gss pipe detection to work in namespaces Dan Carpenter
2013-05-16 13:22 ` Myklebust, Trond
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).