Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3058334pxj; Mon, 17 May 2021 16:41:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz+XxH+M6hpgDuZB7e2pctb0U/2V2A339nY1TY068G25MX7CISSdxHsPL4AEEjBbZ4wbH2D X-Received: by 2002:a17:906:8049:: with SMTP id x9mr2726202ejw.13.1621294892328; Mon, 17 May 2021 16:41:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621294892; cv=none; d=google.com; s=arc-20160816; b=asYUadTtDqbgzjQh0rxlVBbZCqFyvk7Vfe6PHSm8dVZ64HeZKjfEg/AQu9j4gkTgxB wgucaa3MwVcHy6pUsaFzSo+G3jvk/Z5MMvAsGtmyVsA8LU6gKC7iOi851xABVlFM/1dr 9cTYK/oTHrYct40NbDW6U3m91uhiq9Z3U7mwpq1X42nJgDk7FTi2Pcmp80DGk0MMIWL8 nlK4xJ6tnC3fsAPFdWHOnDnd6hormlhHd97+YJfyFHOgCAkj+dEPuDzg9DrK+hkZGUAo /S1UtqJVbQ/9QR9Sd/0bxSO6HQ+mRl/kCFlWZw8aVYg/Bm7E3Tfxj5mTzfJyx4gziUhO K6qg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=W2cuyf4xgf0JmT0Ywm6hf858DTXWdTJlUkzpHka4/CY=; b=kytIv/IqAZVsY3jzdmYa+1bv2Z5BEGIc8qn+feAr0qScfy/+9dN5KckRg7v8tFiurD PJFX0WnFoiaKG3xQzDj+haduZCtCpP7r4eOKiiG2G5RHgQAoi/1wPaYxeI1Wcc2SS+gG KtvfALskGxI5GdFKXOdnGL+r4M9Y5MNataVVmo91hqtts+oeFGUrD4Yp5iVpOZvWQ+yW 1d+rVAXB3U2SudiHJP7R575kTILZWMJgmQ9o/JVzPgTtEpPrEG10b4L/gsiL6RhhxaT5 5yEGHB5i4kE4MhgW7FVAzHkayZmg+PqhQV8RNhJysYUPOfDXYbvQWG1bW96aeDWvNSh7 jhkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=XEigyWbm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ce10si16156992edb.39.2021.05.17.16.40.52; Mon, 17 May 2021 16:41:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@linuxfoundation.org header.s=korg header.b=XEigyWbm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238958AbhEQOWn (ORCPT + 99 others); Mon, 17 May 2021 10:22:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:59262 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238922AbhEQOTE (ORCPT ); Mon, 17 May 2021 10:19:04 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id BC3CC6135B; Mon, 17 May 2021 14:10:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621260649; bh=Gi4mM5mHXrXlvg+hLlpM2WREGyj0O+DQD5JNREvdXpc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XEigyWbmqCEo3W6aEgDo/uLToWB9yNee7sfw1P8T3XnDe0PuF5IWT3xW4MWWdRWpC L+uZ/9iNER+34SzPcpigEw1XBm+hh1+M4VS7PeoutYMbuMF8gDV3puYBndENgllDoa r/lcCPQ+uLjC07xsva3n4YMRobKLAgf2hSEidFMY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hulk Robot , Yang Yingliang , Dominique Martinet , Sasha Levin Subject: [PATCH 5.12 142/363] fs: 9p: fix v9fs_file_open writeback fid error check Date: Mon, 17 May 2021 16:00:08 +0200 Message-Id: <20210517140307.420179018@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517140302.508966430@linuxfoundation.org> References: <20210517140302.508966430@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yang Yingliang [ Upstream commit f8b139e2f24112f4e21f1eb02c7fc7600fea4b8d ] IS_ERR() and PTR_ERR() use wrong pointer, it should be writeback_fid, fix it. Link: http://lkml.kernel.org/r/20210330130632.1054357-1-yangyingliang@huawei.com Fixes: 5bfe97d7382b ("9p: Fix writeback fid incorrectly being attached to dentry") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang [Dominique: adjusted commit summary] Signed-off-by: Dominique Martinet Signed-off-by: Sasha Levin --- fs/9p/vfs_file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/9p/vfs_file.c b/fs/9p/vfs_file.c index 649f04f112dc..59c32c9b799f 100644 --- a/fs/9p/vfs_file.c +++ b/fs/9p/vfs_file.c @@ -86,8 +86,8 @@ int v9fs_file_open(struct inode *inode, struct file *file) * to work. */ writeback_fid = v9fs_writeback_fid(file_dentry(file)); - if (IS_ERR(fid)) { - err = PTR_ERR(fid); + if (IS_ERR(writeback_fid)) { + err = PTR_ERR(writeback_fid); mutex_unlock(&v9inode->v_mutex); goto out_error; } -- 2.30.2