From: Christian Schoenebeck <linux_oss@crudebyte.com>
To: Tyler Hicks <tyhicks@linux.microsoft.com>,
Eric Van Hensbergen <ericvh@gmail.com>,
Latchesar Ionkov <lucho@ionkov.net>,
Dominique Martinet <asmadeus@codewreck.org>,
Jianyong Wu <jianyong.wu@arm.com>,
v9fs-developer@lists.sourceforge.net
Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH 02/06] 9p: fix fid refcount leak in v9fs_vfs_get_link
Date: Tue, 14 Jun 2022 15:19:55 +0200 [thread overview]
Message-ID: <3172397.lbAG7NvT7i@silver> (raw)
In-Reply-To: <20220612085330.1451496-3-asmadeus@codewreck.org>
On Sonntag, 12. Juni 2022 10:53:25 CEST Dominique Martinet wrote:
> we check for protocol version later than required, after a fid has
> been obtained. Just move the version check earlier.
>
> Fixes: 6636b6dcc3db ("9p: add refcount to p9_fid struct")
> Cc: stable@vger.kernel.org
> Signed-off-by: Dominique Martinet <asmadeus@codewreck.org>
> ---
Reviewed-by: Christian Schoenebeck <linux_oss@crudebyte.com>
> fs/9p/vfs_inode.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c
> index 55367ecb9442..18c780ffd4b5 100644
> --- a/fs/9p/vfs_inode.c
> +++ b/fs/9p/vfs_inode.c
> @@ -1250,15 +1250,15 @@ static const char *v9fs_vfs_get_link(struct dentry
> *dentry, return ERR_PTR(-ECHILD);
>
> v9ses = v9fs_dentry2v9ses(dentry);
> - fid = v9fs_fid_lookup(dentry);
> + if (!v9fs_proto_dotu(v9ses))
> + return ERR_PTR(-EBADF);
> +
> p9_debug(P9_DEBUG_VFS, "%pd\n", dentry);
> + fid = v9fs_fid_lookup(dentry);
>
> if (IS_ERR(fid))
> return ERR_CAST(fid);
>
> - if (!v9fs_proto_dotu(v9ses))
> - return ERR_PTR(-EBADF);
> -
> st = p9_client_stat(fid);
> p9_client_clunk(fid);
> if (IS_ERR(st))
next prev parent reply other threads:[~2022-06-14 13:20 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-12 8:53 [PATCH 00/06] fid refcounting improvements and fixes Dominique Martinet
2022-06-12 8:53 ` [PATCH 01/06] 9p: fix fid refcount leak in v9fs_vfs_atomic_open_dotl Dominique Martinet
2022-06-13 16:27 ` Tyler Hicks
2022-06-14 13:17 ` Christian Schoenebeck
2022-06-12 8:53 ` [PATCH 02/06] 9p: fix fid refcount leak in v9fs_vfs_get_link Dominique Martinet
2022-06-13 16:29 ` Tyler Hicks
2022-06-14 13:19 ` Christian Schoenebeck [this message]
2022-06-12 8:53 ` [PATCH 03/06] 9p: v9fs_fid_lookup_with_uid fix's fix suggestion Dominique Martinet
2022-06-13 20:08 ` Tyler Hicks
2022-06-12 8:53 ` [PATCH 04/06] 9p fid refcount: add p9_fid_get/put wrappers Dominique Martinet
2022-06-12 23:45 ` [PATCH v2 " Dominique Martinet
2022-06-13 17:31 ` Tyler Hicks
2022-06-14 13:55 ` Christian Schoenebeck
2022-06-14 14:27 ` Dominique Martinet
2022-06-15 3:16 ` [PATCH v3 " Dominique Martinet
2022-06-15 13:00 ` Christian Schoenebeck
2022-06-15 13:47 ` Dominique Martinet
2022-06-12 8:53 ` [PATCH 05/06] 9p fid refcount: add a 9p_fid_ref tracepoint Dominique Martinet
2022-06-12 22:46 ` Steven Rostedt
2022-06-12 23:46 ` [PATCH v2 " Dominique Martinet
2022-06-13 7:00 ` Dominique Martinet
2022-06-12 8:53 ` [PATCH 06/06] 9p fid refcount: cleanup p9_fid_put calls Dominique Martinet
2022-06-13 17:55 ` Tyler Hicks
2022-06-13 19:50 ` Dominique Martinet
2022-06-13 20:12 ` Tyler Hicks
2022-06-13 20:20 ` [PATCH 00/06] fid refcounting improvements and fixes Tyler Hicks
2022-06-13 21:00 ` Dominique Martinet
2022-06-14 1:14 ` Tyler Hicks
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3172397.lbAG7NvT7i@silver \
--to=linux_oss@crudebyte.com \
--cc=asmadeus@codewreck.org \
--cc=ericvh@gmail.com \
--cc=jianyong.wu@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lucho@ionkov.net \
--cc=stable@vger.kernel.org \
--cc=tyhicks@linux.microsoft.com \
--cc=v9fs-developer@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox