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:	Tue, 7 Feb 2012 14:11:46 +0000
From:	"Myklebust, Trond" <Trond.Myklebust@...app.com>
To:	Stanislav Kinsbursky <skinsbursky@...allels.com>
CC:	"linux-nfs@...r.kernel.org" <linux-nfs@...r.kernel.org>,
	Pavel Emelianov <xemul@...allels.com>,
	"neilb@...e.de" <neilb@...e.de>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	James Bottomley <jbottomley@...allels.com>,
	"bfields@...ldses.org" <bfields@...ldses.org>,
	"davem@...emloft.net" <davem@...emloft.net>,
	"devel@...nvz.org" <devel@...nvz.org>
Subject: Re: [PATCH 4/4] NFS: make nfs_client_lock per net ns

On Tue, 2012-02-07 at 18:09 +0400, Stanislav Kinsbursky wrote:
> 07.02.2012 17:51, Myklebust, Trond пишет:
> > 8<-------------------------------------------------------------------------
> >  From 5a489156da4fd15dd143f2b21dd9657b97dcef88 Mon Sep 17 00:00:00 2001
> > From: Trond Myklebust<Trond.Myklebust@...app.com>
> > Date: Tue, 7 Feb 2012 00:05:11 -0500
> > Subject: [PATCH] NFS: Initialise the nfs_net->nfs_client_lock
> >
> > Ensure that we initialise the nfs_net->nfs_client_lock spinlock.
> > Also ensure that nfs_server_remove_lists() doesn't try to
> > dereference server->nfs_client before that is initialised.
> >
> 
> Sorry.
> Patch looks nice. Except one notice below.
> 
> > Signed-off-by: Trond Myklebust<Trond.Myklebust@...app.com>
> > Cc: Stanislav Kinsbursky<skinsbursky@...allels.com>
> > ---
> >   fs/nfs/client.c |    6 +++++-
> >   1 files changed, 5 insertions(+), 1 deletions(-)
> >
> > diff --git a/fs/nfs/client.c b/fs/nfs/client.c
> > index 1a5cd49..f0dacad 100644
> > --- a/fs/nfs/client.c
> > +++ b/fs/nfs/client.c
> > @@ -1055,8 +1055,11 @@ static void nfs_server_insert_lists(struct nfs_server *server)
> >   static void nfs_server_remove_lists(struct nfs_server *server)
> >   {
> >   	struct nfs_client *clp = server->nfs_client;
> > -	struct nfs_net *nn = net_generic(clp->net, nfs_net_id);
> > +	struct nfs_net *nn;
> >
> > +	if (clp == NULL)
> > +		return;
> > +	nn = net_generic(clp->net, nfs_net_id);
> >   	spin_lock(&nn->nfs_client_lock);
> >   	list_del_rcu(&server->client_link);
> >   	if (clp&&  list_empty(&clp->cl_superblocks))
> 
> This check for clp != NULL can be removed.
> 

Yep... I'll add that in...

-- 
Trond Myklebust
Linux NFS client maintainer

NetApp
Trond.Myklebust@...app.com
www.netapp.com

Powered by blists - more mailing lists