Received: by 2002:a05:7412:3290:b0:fa:6e18:a558 with SMTP id ev16csp70069rdb; Thu, 25 Jan 2024 08:29:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IFQYey3f+b3orPxnKxT0HKcnjwxOCzYLPgUpElz7YEABaMsQwN31BGqW6AeUyd0l+1XHmN4 X-Received: by 2002:a17:907:a095:b0:a30:cdca:584a with SMTP id hu21-20020a170907a09500b00a30cdca584amr455415ejc.241.1706200199337; Thu, 25 Jan 2024 08:29:59 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706200199; cv=pass; d=google.com; s=arc-20160816; b=wv+TbvkpmsD7i9/25P6NTiedODPdv7+ckGBtQToc8E1prue/rI4oDy8DaMbM6+hbBg cLJaF4ZJCn35uOza932xttLCUoRDQqzTrACvOR1yZtzxMTwFAhiT8r5eQE68XszmoUTm 4EbjN1jfT2E23dacAG5gup9XbRquUGBr/ciuBRYf8ihpN1SxhvsKisZCY0jyoZvoWY06 9ikJQStNS/7dzbwbO0FLkLI25YUVCUU+xyOkIksQZ78tC+S8HeKLGeGEJziMmanhkgbH UYux0K63BM7eWo1yIPBmo2vUAt98MmLvJkylTsPdwFzQLrvIkMHElhtsuF7enqcVWT0y eNrg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:user-agent:references:in-reply-to :message-id:date:to:from:subject:dkim-signature; bh=8hxz/1SnzIAwa2qSxc6v+BWekNf2GA2Gz/x96rfYfTY=; fh=Mys3y4MwsHRytUQMpdfGBn3oGRYLcLloxNwkFYMYMmg=; b=wbugkupw+5VfU5C4/sqhYGrCF6eLljQpEc6yh+1WhGGixozvELbA/546eTCP8BBy5d z45m22EL/a8KlNGdB5EHriHhHL8Uh7zSMsPpdLKD4OA1vlquq0s+aKIClZDNDfk6ipig ctE0CM/ZZT6QXydZmXnw4+56bEZMcaBBeqG4BhLrg6oqsR30ybRi/KhXXjWvfuYvpfMd S89xAkEIZC6MTgkuZk5lkwxILvgb+4VTe2C8gk413bG/GM39VcKB5OVcgrjvVIXpIY2Y yB4h0R7lXpmxue60aD1AcJ1YmarqTqIEvEM4KBE+wUQp5yHOpXk1d7Prn0ekxs8TloNn SMAQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ihIWLL47; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-nfs+bounces-1398-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-nfs+bounces-1398-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id y2-20020a17090629c200b00a3108dee756si1084276eje.150.2024.01.25.08.29.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jan 2024 08:29:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs+bounces-1398-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ihIWLL47; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-nfs+bounces-1398-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-nfs+bounces-1398-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 10D181F27392 for ; Thu, 25 Jan 2024 16:29:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DA300129A8D; Thu, 25 Jan 2024 16:29:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ihIWLL47" X-Original-To: linux-nfs@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B6727129A8C for ; Thu, 25 Jan 2024 16:29:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706200191; cv=none; b=ebXfWt5zxpynyPOFT7tdFxK32wSTJnncHbNqgHa5Qlp3MjtVv75+SJJfRg16sIjcaJ55vXsxBEzJkecq7Odo1J71ewLEIPj0Kwq5cCqdzsX8O9y5hnQ1fEYIWvm/kCj/UKTbCcx+F4jLb02U1gXsYg2DmolwnT+dN7jSklR2Wj8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706200191; c=relaxed/simple; bh=ew6rJvn++WxXwaCqxrMp1ipSOssALPhsQhScx9b3X2M=; h=Subject:From:To:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=D4k5zllqgB40uLo91v62958zreVSV9eAVHCgjVk5Vdx/CyKsNEabgvdXmMpLdJFQBPHp0gJjGJJq3bLDaaW7UcdrTcbB2YfePnSdFFVmwhT9kbjGMKbJRlBWTROMLKHJpgMxEWTXXBWv7dXjztI/Ck6999gVJL66BFS5wrrRZsU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ihIWLL47; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 22603C433C7 for ; Thu, 25 Jan 2024 16:29:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706200191; bh=ew6rJvn++WxXwaCqxrMp1ipSOssALPhsQhScx9b3X2M=; h=Subject:From:To:Date:In-Reply-To:References:From; b=ihIWLL471WT47GxjlATJnMl7COB0V5APnIFCZs9iOiWgcap5XlyWJLmgS4XjB97yl 2x+q2sNChaVM1B0/+uzKKmSk1pDchfJkC8YMSvug7EB7PdOSoVEs348caVVyf2NMOE sYIMcG5QMngiGvUqcwOncEe9OCqGA6CMRC7e4ckqFx3aYIG+z14YabZWZHi5L+GUKC QRho558NAvZM76jQ5LbOgnjwAQSEX6V0iwOoR0K/YVHe3JU8+/itIhaQ+g9wxBm1dc agpZHGj9PhmQP+fnxc/zxzIkXYh379qKCsTH1Zq3sDucZP3F+gZBeRRzYBpZ7auAk4 /szwtrmfpeP9g== Subject: [PATCH RFC 11/13] NFSD: Remove BUG_ON in nfsd4_process_cb_update() From: Chuck Lever To: linux-nfs@vger.kernel.org Date: Thu, 25 Jan 2024 11:29:50 -0500 Message-ID: <170620019007.2833.17281344766250004438.stgit@manet.1015granger.net> In-Reply-To: <170619984210.2833.7173004255003914651.stgit@manet.1015granger.net> References: <170619984210.2833.7173004255003914651.stgit@manet.1015granger.net> User-Agent: StGit/1.5 Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit From: Chuck Lever Don't kill the kworker thread, and don't panic while cl_lock is held. There's no need for scorching the earth here. Signed-off-by: Chuck Lever --- fs/nfsd/nfs4callback.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c index dc308569bc31..46ecb3ec0f8f 100644 --- a/fs/nfsd/nfs4callback.c +++ b/fs/nfsd/nfs4callback.c @@ -1362,8 +1362,9 @@ static void nfsd4_process_cb_update(struct nfsd4_callback *cb) * Only serialized callback code is allowed to clear these * flags; main nfsd code can only set them: */ - BUG_ON(!(clp->cl_flags & NFSD4_CLIENT_CB_FLAG_MASK)); + WARN_ON(!(clp->cl_flags & NFSD4_CLIENT_CB_FLAG_MASK)); clear_bit(NFSD4_CLIENT_CB_UPDATE, &clp->cl_flags); + memcpy(&conn, &cb->cb_clp->cl_cb_conn, sizeof(struct nfs4_cb_conn)); c = __nfsd4_find_backchannel(clp); if (c) {