Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp1612838ybx; Thu, 7 Nov 2019 14:27:53 -0800 (PST) X-Google-Smtp-Source: APXvYqzr6EjFz90Rdxc+Pdcql4mQvax+7WQaeko3HvhXKBPqtPt/b/sPKGPWhoOR9Rf3EVjcg/AR X-Received: by 2002:a17:906:524b:: with SMTP id y11mr5469395ejm.82.1573165673355; Thu, 07 Nov 2019 14:27:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573165673; cv=none; d=google.com; s=arc-20160816; b=0A012M3n5a962NoJ4mhQUmPRpKjZ+RlkbPlp14p06/SsrESxIK5xjHBnCjzyi7gzn4 DuiJyUOuxPh0vnzhuUnm7R/ye9ZxwvmwKH95kujruuMCxw+u5Agw7s2zG3SUG2uf8qGr sXTwPp8tvmS7M+cUVRNYchxuMnTCVE3uXhsezl1Ts4YG7FVfS64TOUJjUw1eq3HoBFxL x3g1X43go0A2JmRIn8i/f6I97Ax7B5WwxoKy6fuG1RGAtjp3o7bMla9Uc8oRP9caGSqO 8Rn+JQsvaOBgtQwqpIuxLPEhABRP8nllPiIp6SKmNVUX4iQSDIQNdtXYScK1ctd2MaEw DXeQ== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=ntMLnqdSFa59/7nOtehbQOMgI1r1ScNak6atEgbhjJE=; b=J1XGHd4GbSKsEiZMPW16J1+sGOUiF9U9ibym8jEgQkEDUSPny8yEDmXuuSxWeLiP9Y SJwpgh8Bnk/acoKzII+ggOmpvnjV/nUZY0lgP9GdnErKxonPZrCEg7nikb/goauzRiY9 kHSVrHi6VdZPfLZQ59sV/YRwulBH/111mgUfHcC+Onuy/UZtrWqR8+qpEnZz46iPPuV0 t5dn725D0wDGBFo91FJ8ZVgJ2OwiX75uNX5eQsxktj+PCRa37df0i/vkQAu+cjEuKetf V8fVfpcBaPpmSOhaf3E5toMktGrc4P1fjPzvu9y+XxrDYUsVmXgvusa/er9x1DZmUAOV B/ew== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h11si2926752edf.93.2019.11.07.14.27.16; Thu, 07 Nov 2019 14:27:53 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-nfs-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-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725945AbfKGW1N (ORCPT + 99 others); Thu, 7 Nov 2019 17:27:13 -0500 Received: from fieldses.org ([173.255.197.46]:35648 "EHLO fieldses.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725906AbfKGW1M (ORCPT ); Thu, 7 Nov 2019 17:27:12 -0500 Received: by fieldses.org (Postfix, from userid 2815) id 4FCBF3F5; Thu, 7 Nov 2019 17:27:12 -0500 (EST) Date: Thu, 7 Nov 2019 17:27:12 -0500 From: "J. Bruce Fields" To: "J. Bruce Fields" Cc: Trond Myklebust , "linux-nfs@vger.kernel.org" Subject: Re: [PATCH v2] nfsd: Fix races between nfsd4_cb_release() and nfsd4_shutdown_callback() Message-ID: <20191107222712.GB10806@fieldses.org> References: <20191023214318.9350-1-trond.myklebust@hammerspace.com> <20191025145147.GA16053@pick.fieldses.org> <97f56de86f0aeafb56998023d0561bb4a6233eb8.camel@hammerspace.com> <20191025152119.GC16053@pick.fieldses.org> <20191025153336.GA20283@fieldses.org> <20191029214705.GA29280@fieldses.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191029214705.GA29280@fieldses.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Tue, Oct 29, 2019 at 05:47:05PM -0400, J. Bruce Fields wrote: > On Fri, Oct 25, 2019 at 11:33:36AM -0400, bfields wrote: > > On Fri, Oct 25, 2019 at 11:21:19AM -0400, J. Bruce Fields wrote: > > > I thought I was running v2, let me double-check.... > > > > Yes, with v2 I'm getting a hang on generic/013. > > > > I checked quickly and didn't see anything interesting in the logs, > > otherwise I haven't done any digging. > > Reproduceable just with ./check -nfs generic/013. The last thing I see > in wireshark is an asynchronous COPY call and reply. Which means it's > probably trying to do a CB_OFFLOAD. Hm. Oh, I think it just needs the following. --b. diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c index fb71e7f9d0d9..e49604701a71 100644 --- a/fs/nfsd/nfs4callback.c +++ b/fs/nfsd/nfs4callback.c @@ -1026,8 +1026,8 @@ static bool nfsd41_cb_get_slot(struct nfsd4_callback *cb, struct rpc_task *task) return false; } rpc_wake_up_queued_task(&clp->cl_cb_waitq, task); - cb->cb_holds_slot = true; } + cb->cb_holds_slot = true; return true; }