Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5363550rwb; Mon, 14 Nov 2022 03:38:31 -0800 (PST) X-Google-Smtp-Source: AA0mqf6ZOTJJYM7bLa7DnSiIjTeQusqQQTlWYpqauPaobhqb7IWybmoj3sN/ZjQGCch5cKRwsgr3 X-Received: by 2002:a65:5bc9:0:b0:46f:ec9c:b239 with SMTP id o9-20020a655bc9000000b0046fec9cb239mr11601810pgr.33.1668425911409; Mon, 14 Nov 2022 03:38:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668425911; cv=none; d=google.com; s=arc-20160816; b=opsYINlIg+jngfplyRoxpUYe3htBh7orqvU8MTOxmB65RVK7am9IXMT6jmCUlrQScK 79/ik2+RZuxMRdAIM2KNrRKhhcxLsyFVK1RaTE5ZianwG95SC4rty9fkPv4GD9LsvcQz zzj/hMXWzW0oYbk2ekViEDDiWUByeOPWYFE5ri2rZVnqtHt+KOv/uXHZtVpOcLgKxPKr TLJ0np29EvfSqzTe19VBHgN1NeoTis8xn3HtiugjkOfBqYgQZFE7Uf5im656vzNEP+D3 fTIJdBEIsPGSzhS7QkW3S8mHx0+/0o2aKkUjkPZ1c9YVUULce/2C+B9iSReeU7FW56Mi WpWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:to:from :subject:message-id:dkim-signature; bh=ivWXDVuDTzbBWJDoOAHUmDCHYnos8dAy5ubsKL23eRw=; b=mtGDi3LH9IURHqrHO5r6otF8pb6hJEasEv/vdEjaXwTrZvY4FzK7qEnY2doUvCiTcE 3Ae1mRlVIsSjqxGQn+u0yxbYdVWaG5m6O1KHz9IVyEawKkLsIwgZD4OtTed5a8VbHmS9 yZZlXfkOwFpF8pNgzLMIUfwSHNwgwPig2/26/WevlQ3Ru3FGxoww81ROpgXcdCU1adg3 EGi8Z7f/wYWqPLudIgRhtvRFDCZlRBtbFoo3mCHIfCRiNUP/0eq3OqXIgAnAxR3NKF6k kgykcaIhqWcbucuxhCUypi4V2qFJ9OmOfkd5nAJ/nlUnoK8siYYtta2TIOQwjvGpoDv8 PvTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Thwm9ZR6; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a1-20020a630b41000000b0043c01032729si8929987pgl.666.2022.11.14.03.38.17; Mon, 14 Nov 2022 03:38:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Thwm9ZR6; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235979AbiKNLfr (ORCPT + 99 others); Mon, 14 Nov 2022 06:35:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33276 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229484AbiKNLfq (ORCPT ); Mon, 14 Nov 2022 06:35:46 -0500 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC45FE0C7 for ; Mon, 14 Nov 2022 03:35:45 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 51C2DCE0F42 for ; Mon, 14 Nov 2022 11:35:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4D393C433D6; Mon, 14 Nov 2022 11:35:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668425742; bh=iALigbJ4nQScfxMZYqXyC5R8/XIrwizEkKTGMI9c12w=; h=Subject:From:To:Date:In-Reply-To:References:From; b=Thwm9ZR6dfvPp46NNhH/VeWu+z7Yrtxb7XkLMMbDhFGIzhKeSl3eL2W6YP1BvZG5w Ho0WSyoi3DVIFI6iI8soQxWENBMKO8tbCVFme++l0jYqOFu8nZVrzHOJFb8QNHEhcG w6o8V4eHwZPmJYfGwoXuDmGsuFmE79drRiatNlOTRG0uXoucVju3MoLfrI3tWsV2I5 XFgU2mc7MXY+KXc3m605G5V0tCAru2seWzVoL42i7N8SjdXSJ/61jqvYXxw8SR1dJv lNXb6UqhUhLupY/n80SLe8/7csVVhUfYi9DDcKQGc32lYuX/JHFgNwbjZFxNMkuC1K QVfVo9qX8fY7g== Message-ID: Subject: Re: [PATCH] NFSD: Fix trace_nfsd_fh_verify_err() crasher From: Jeff Layton To: Chuck Lever , linux-nfs@vger.kernel.org Date: Mon, 14 Nov 2022 06:35:40 -0500 In-Reply-To: <166828356768.42842.2412588018662481301.stgit@klimt.1015granger.net> References: <166828356768.42842.2412588018662481301.stgit@klimt.1015granger.net> Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4 (3.44.4-2.fc36) MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Sat, 2022-11-12 at 15:06 -0500, Chuck Lever wrote: > Now that the nfsd_fh_verify_err() tracepoint is always called on > error, it needs to handle cases where the filehandle is not yet > fully formed. >=20 > Fixes: 93c128e709ae ("nfsd: ensure we always call fh_verify_error tracepo= int") > Signed-off-by: Chuck Lever > --- > fs/nfsd/trace.h | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) >=20 > diff --git a/fs/nfsd/trace.h b/fs/nfsd/trace.h > index ef01ecd3eec6..331a33a8f1f8 100644 > --- a/fs/nfsd/trace.h > +++ b/fs/nfsd/trace.h > @@ -254,7 +254,10 @@ TRACE_EVENT_CONDITION(nfsd_fh_verify_err, > rqstp->rq_xprt->xpt_remotelen); > __entry->xid =3D be32_to_cpu(rqstp->rq_xid); > __entry->fh_hash =3D knfsd_fh_hash(&fhp->fh_handle); > - __entry->inode =3D d_inode(fhp->fh_dentry); > + if (fhp->fh_dentry) > + __entry->inode =3D d_inode(fhp->fh_dentry); > + else > + __entry->inode =3D NULL; > __entry->type =3D type; > __entry->access =3D access; > __entry->error =3D be32_to_cpu(error); >=20 Doh! Reviewed-by: Jeff Layton