Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3138401pxb; Fri, 5 Nov 2021 10:21:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx5YM12vPYWNiBGFY2sI3SE8LAQCygC7U8QX6uk5h+jG4X8EBcfgZr0gZJOA+mRR0n3BGcz X-Received: by 2002:a92:d48f:: with SMTP id p15mr39394133ilg.236.1636132886067; Fri, 05 Nov 2021 10:21:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1636132886; cv=none; d=google.com; s=arc-20160816; b=WlTc+zFvVj0hK556VgTY6FG/piZMh/IYgOMlwlxJNwWWFYSRa0GXRTeWGx8Khnf6nh 1g6pUMPL1Z2jBrUnubIvGENhKpMYlTTcAElqXJ4zp7xhs8dXjG0K9BacMs3BYcsYKQTq RhS5Pw5NkQc17z6UtpHouB+F63t6infPUWW0OFMLSUOr7OKItq2cw0njg+sk+lGQqk0+ 93oAkM+RSjg8kIlj0d338kMRPaFHnTxHOE3tFGAPNKnKk6xYuLqqfyHcxwHyRqFzIPfM 2UXgWhdSxV020YU2j+gbHdHqwOeLLwKMegNhegbinfqm6ET7ngMJ1UigMQhRfBkTF+RZ 3jZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=USmB1ViOzmgW3qJaFsXXQYOmjP6ykmPxFhh6o13Uylo=; b=L8uP01sdyLYgEnFwMr8t/Ok9i0BahMeYd/gdl1vI0+VE4fArRUuKtY9UmMmiAnCb7g GzWATp/LQ0eLkIcWyV0yhWBHJN6pRURPmLG2r/fYmi6mGKSlC7zdM0BUsDTo9/DH85J0 lGaY1C5+Wo0dXiFp7F/w5S5Y+xC1C4hl/EnqXnzTG1DNdQf2e5lK9IuPiUXW+tXJq7ta 58ShcJAnjowYChP/UpAlAe07zRgofHkTeTuzDUkEpNCZmOFvB4+qi3NfnbBK8PjV9FUY YyvkieD2L9PGUtWPr3NC30OTq9epZj0TNHe6vVKmfEdnxzcQXOLYObi+U1mslvK2EFCf yw9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sQfU9vUd; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w12si17467302iov.5.2021.11.05.10.20.50; Fri, 05 Nov 2021 10:21:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sQfU9vUd; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 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 S233951AbhKEQsT (ORCPT + 99 others); Fri, 5 Nov 2021 12:48:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:58178 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232930AbhKEQsT (ORCPT ); Fri, 5 Nov 2021 12:48:19 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2CFF2610A8; Fri, 5 Nov 2021 16:45:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1636130739; bh=VJlv6OgsCRlGMEQ8GqH++YjUx1BlID7ZjiCLK2/GkvU=; h=From:To:Cc:Subject:Date:From; b=sQfU9vUdz6zDcMjaOxQp6oXRAivuJO6Lq+BS8VC/7N+TKOskUK52EVxuzy49QIbUw aQi1NrXIRxS3MJa4IWW3rmqUfCtz1IPOk91nnBz1IbkDVNkcHROGQgi9DJRqR7sXVx f90yh9Epd4N7DeigLNeOof81qN3PSYUZ/dSX4YreItGAm3+cpyZwM6yPmix8D8qxVE Dvz/pvbRqNmvD3YnX7UyHHSMqqJjRdCo/mYvbQfJmqNBGpiKyUqBcUJAk93iAP+9VB uZQ3hQ3ZWonkDM84ZZ/3y0fExDk/we74qCzdGu7m5QfjanVyeSR+JGs2ids/DLZUM1 QwowX8UXoQo1A== From: trondmy@kernel.org To: Nathan Chancellor Cc: linux-nfs@vger.kernel.org Subject: [PATCH] NFS: Don't trace an uninitialised value Date: Fri, 5 Nov 2021 12:38:52 -0400 Message-Id: <20211105163852.214665-1-trondmy@kernel.org> X-Mailer: git-send-email 2.33.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org From: Trond Myklebust If fhandle is NULL or fattr is NULL, then 'error' is uninitialised. Reported-by: Nathan Chancellor Signed-off-by: Trond Myklebust --- fs/nfs/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index 8de99f426183..731d31015b6a 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@ -1798,7 +1798,7 @@ struct dentry *nfs_lookup(struct inode *dir, struct dentry * dentry, unsigned in } nfs_set_verifier(dentry, dir_verifier); out: - trace_nfs_lookup_exit(dir, dentry, flags, error); + trace_nfs_lookup_exit(dir, dentry, flags, PTR_ERR_OR_ZERO(res)); nfs_free_fattr(fattr); nfs_free_fhandle(fhandle); return res; -- 2.33.1