From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.kernel.org ([198.145.29.99]:35658 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751017AbeEQJu6 (ORCPT ); Thu, 17 May 2018 05:50:58 -0400 Date: Thu, 17 May 2018 11:50:40 +0200 From: Greg Kroah-Hartman To: "J. Bruce Fields" Cc: Ben Hutchings , stable@vger.kernel.org, David Jeffery , Sasha Levin , LKML Subject: Re: [PATCH 4.4 014/190] lockd: fix lockd shutdown race Message-ID: <20180517095040.GC28396@kroah.com> References: <20180411183550.114495991@linuxfoundation.org> <20180411183550.916927223@linuxfoundation.org> <1526409864.9159.32.camel@codethink.co.uk> <20180516195329.GA24474@parsley.fieldses.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180516195329.GA24474@parsley.fieldses.org> Sender: stable-owner@vger.kernel.org List-ID: On Wed, May 16, 2018 at 03:53:29PM -0400, J. Bruce Fields wrote: > On Tue, May 15, 2018 at 07:44:24PM +0100, Ben Hutchings wrote: > > On Wed, 2018-04-11 at 20:34 +0200, Greg Kroah-Hartman wrote: > > > 4.4-stable review patch.��If anyone has any objections, please let me know. > > > > > > ------------------ > > > > > > From: "J. Bruce Fields" > > > > > > > > > [ Upstream commit efda760fe95ea15291853c8fa9235c32d319cd98 ] > > [...] > > > --- a/fs/lockd/svc.c > > > +++ b/fs/lockd/svc.c > > > @@ -129,6 +129,8 @@ lockd(void *vrqstp) > > > �{ > > > � int err = 0; > > > � struct svc_rqst *rqstp = vrqstp; > > > + struct net *net = &init_net; > > > + struct lockd_net *ln = net_generic(net, lockd_net_id); > > > � > > > � /* try_to_freeze() is called from svc_recv() */ > > > � set_freezable(); > > > @@ -173,6 +175,8 @@ lockd(void *vrqstp) > > > � if (nlmsvc_ops) > > > � nlmsvc_invalidate_all(); > > >� nlm_shutdown_hosts(); > > > + cancel_delayed_work_sync(&ln->grace_period_end); > > > + locks_end_grace(&ln->lockd_manager); > > > � return 0; > > > �} > > > � > > > @@ -267,8 +271,6 @@ static void lockd_down_net(struct svc_se > > > � if (ln->nlmsvc_users) { > > > � if (--ln->nlmsvc_users == 0) { > > > � nlm_shutdown_hosts_net(net); > > > - cancel_delayed_work_sync(&ln->grace_period_end); > > > - locks_end_grace(&ln->lockd_manager); > > > > Aren't these statements still needed for non-initial namespaces? > > Looks like this this should be backported only if 3a2b19d1ee56 "lockd: > lost rollback of set_grace_period() in lockd_down_net()" is also. Looks like it, thanks, now queued up. greg k-h