Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2440048imm; Wed, 16 May 2018 12:55:11 -0700 (PDT) X-Google-Smtp-Source: AB8JxZo7LNedNGpzxBRIIM4p4KwZs+wcV6ppdJ+5EOEXeH8ppzjQtEWatVMKCffJrKesxhVu7gKA X-Received: by 2002:a62:a6ce:: with SMTP id r75-v6mr2342704pfl.82.1526500511813; Wed, 16 May 2018 12:55:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526500511; cv=none; d=google.com; s=arc-20160816; b=CI9WYJBbr9ojst7dHzy7d6iAYzv64BVr6Gb7I8oTtVdVppQSOXpg5wgJZ1V0pwdC+m CX4S4gB0RWce8jFDBFA1z59GyATSQLEVht3K91BW/QOxeM/w82rdQz/aCqtQAQSxtFMZ jkqNX2qVshbztEimr457w0REDmN5fbLmbHN6tY9GkAy/i5JwuaS+0PaZSANWpvwE+vR3 sTgZ8Qz/5MNsh40dB23FK3FXmFHRcHxopJU/QsLUJZcFKjE938UorLLEjaKXBCt7oLGS Pu9Z5bQhmBnNVLwrx6cu2g8gkjyMgFZHHwo/MJ46BM84tdt8+D0FnABB3y9PkPQ6KJ6H w8DQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date :arc-authentication-results; bh=/1Zt13klD+ww3o4u40ypZlH2A2I65O7HFCUvyC8fTKw=; b=K7WEQrKXDuwOEtbIqbYrgUDH1yA+9SXa0yX6soBa5rekp8QIjID/fTdikUTGlLdka8 keNU8P84pkVZlbeV5lnVvDeR4+dDXkrqffuxzGzxdxlkPnpzwpEkZSkaNNuFJUp6xYuE kPrEWG0GKrLsfAnb8WHegDChKEQrtx1hJCt/ZLzKZZvNNww/1nKlmrZhaMKg17r2JAoG u9IOWEZBTYwiJD8rZk4g1eCQReqcgn7m4EuzJcT1l0kZKXZ5SFQAYYpMSVBjfCstU75q F2Ufs3hARTrXnXq5gl4ck71dQWLISZliC54cPq9fVS48F2wVZrJX7TvOxV0z9abfjUaG H+kg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f39-v6si3309981plb.572.2018.05.16.12.54.57; Wed, 16 May 2018 12:55:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751430AbeEPTxc (ORCPT + 99 others); Wed, 16 May 2018 15:53:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57124 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750806AbeEPTxb (ORCPT ); Wed, 16 May 2018 15:53:31 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 13C9A3002F6D; Wed, 16 May 2018 19:53:31 +0000 (UTC) Received: from parsley.fieldses.org (ovpn-117-124.phx2.redhat.com [10.3.117.124]) by smtp.corp.redhat.com (Postfix) with ESMTP id D6FAA1001951; Wed, 16 May 2018 19:53:30 +0000 (UTC) Received: by parsley.fieldses.org (Postfix, from userid 2815) id E8F3418043C; Wed, 16 May 2018 15:53:29 -0400 (EDT) Date: Wed, 16 May 2018 15:53:29 -0400 From: "J. Bruce Fields" To: Ben Hutchings Cc: stable@vger.kernel.org, David Jeffery , Sasha Levin , Greg Kroah-Hartman , LKML Subject: Re: [PATCH 4.4 014/190] lockd: fix lockd shutdown race Message-ID: <20180516195329.GA24474@parsley.fieldses.org> References: <20180411183550.114495991@linuxfoundation.org> <20180411183550.916927223@linuxfoundation.org> <1526409864.9159.32.camel@codethink.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1526409864.9159.32.camel@codethink.co.uk> User-Agent: Mutt/1.9.5 (2018-04-13) X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Wed, 16 May 2018 19:53:31 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. --b.