lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 19 Jan 2018 11:27:19 -0500
From:   Bruce Fields <bfields@...ldses.org>
To:     Chuck Lever <chuck.lever@...cle.com>
Cc:     Arnd Bergmann <arnd@...db.de>, Jeff Layton <jlayton@...nel.org>,
        Trond Myklebust <trond.myklebust@...marydata.com>,
        Kinglong Mee <kinglongmee@...il.com>,
        Linux NFS Mailing List <linux-nfs@...r.kernel.org>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] NFSD: hide unused svcxdr_dupstr()

On Fri, Jan 19, 2018 at 11:15:33AM -0500, Chuck Lever wrote:
> 
> 
> > On Jan 19, 2018, at 9:54 AM, Arnd Bergmann <arnd@...db.de> wrote:
> > 
> > There is now only one caller left for svcxdr_dupstr() and this is inside
> > of an #ifdef, so we can get a warning when the option is disabled:
> > 
> > fs/nfsd/nfs4xdr.c:241:1: error: 'svcxdr_dupstr' defined but not used [-Werror=unused-function]
> > 
> > This adds another #ifdef around the definition.
> > 
> > Fixes: e40d99e6183e ("NFSD: Clean up symlink argument XDR decoders")
> > Signed-off-by: Arnd Bergmann <arnd@...db.de>
> 
> Seems OK to me, and sorry for the noise.
> 
> Reviewed-by: Chuck Lever <chuck.lever@...cle.com>

Thanks!

--b.

> 
> 
> > ---
> > fs/nfsd/nfs4xdr.c | 2 ++
> > 1 file changed, 2 insertions(+)
> > 
> > diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
> > index f51c9cccaf78..374a62af6034 100644
> > --- a/fs/nfsd/nfs4xdr.c
> > +++ b/fs/nfsd/nfs4xdr.c
> > @@ -237,6 +237,7 @@ svcxdr_tmpalloc(struct nfsd4_compoundargs *argp, u32 len)
> >  * Note null-terminating in place usually isn't safe since the
> >  * buffer might end on a page boundary.
> >  */
> > +#ifdef CONFIG_NFSD_V4_SECURITY_LABEL
> > static char *
> > svcxdr_dupstr(struct nfsd4_compoundargs *argp, void *buf, u32 len)
> > {
> > @@ -248,6 +249,7 @@ svcxdr_dupstr(struct nfsd4_compoundargs *argp, void *buf, u32 len)
> > 	p[len] = '\0';
> > 	return p;
> > }
> > +#endif
> > 
> > /**
> >  * savemem - duplicate a chunk of memory for later processing
> > -- 
> > 2.9.0
> > 
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> > the body of a message to majordomo@...r.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> --
> Chuck Lever
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ