<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/fs/9p, branch v5.15.208</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v5.15.208</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v5.15.208'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-12-06T21:09:25+00:00</updated>
<entry>
<title>9p: sysfs_init: don't hardcode error to ENOMEM</title>
<updated>2025-12-06T21:09:25+00:00</updated>
<author>
<name>Randall P. Embry</name>
<email>rpembry@gmail.com</email>
</author>
<published>2025-09-26T09:27:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a66596cf5643008f5edf53a10f62a60d1068759e'/>
<id>urn:sha1:a66596cf5643008f5edf53a10f62a60d1068759e</id>
<content type='text'>
[ Upstream commit 528f218b31aac4bbfc58914d43766a22ab545d48 ]

v9fs_sysfs_init() always returned -ENOMEM on failure;
return the actual sysfs_create_group() error instead.

Signed-off-by: Randall P. Embry &lt;rpembry@gmail.com&gt;
Message-ID: &lt;20250926-v9fs_misc-v1-3-a8b3907fc04d@codewreck.org&gt;
Signed-off-by: Dominique Martinet &lt;asmadeus@codewreck.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>9p: fix /sys/fs/9p/caches overwriting itself</title>
<updated>2025-12-06T21:09:25+00:00</updated>
<author>
<name>Randall P. Embry</name>
<email>rpembry@gmail.com</email>
</author>
<published>2025-09-26T09:27:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=435b42a10995ae3227f9ebbd671d4342fa70ffff'/>
<id>urn:sha1:435b42a10995ae3227f9ebbd671d4342fa70ffff</id>
<content type='text'>
[ Upstream commit 86db0c32f16c5538ddb740f54669ace8f3a1f3d7 ]

caches_show() overwrote its buffer on each iteration,
so only the last cache tag was visible in sysfs output.

Properly append with snprintf(buf + count, …).

Signed-off-by: Randall P. Embry &lt;rpembry@gmail.com&gt;
Message-ID: &lt;20250926-v9fs_misc-v1-2-a8b3907fc04d@codewreck.org&gt;
Signed-off-by: Dominique Martinet &lt;asmadeus@codewreck.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>9p: add missing locking around taking dentry fid list</title>
<updated>2024-10-17T13:11:47+00:00</updated>
<author>
<name>Dominique Martinet</name>
<email>asmadeus@codewreck.org</email>
</author>
<published>2024-05-21T12:13:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3bb6763a8319170c2d41c4232c8e7e4c37dcacfb'/>
<id>urn:sha1:3bb6763a8319170c2d41c4232c8e7e4c37dcacfb</id>
<content type='text'>
commit c898afdc15645efb555acb6d85b484eb40a45409 upstream.

Fix a use-after-free on dentry's d_fsdata fid list when a thread
looks up a fid through dentry while another thread unlinks it:

UAF thread:
refcount_t: addition on 0; use-after-free.
 p9_fid_get linux/./include/net/9p/client.h:262
 v9fs_fid_find+0x236/0x280 linux/fs/9p/fid.c:129
 v9fs_fid_lookup_with_uid linux/fs/9p/fid.c:181
 v9fs_fid_lookup+0xbf/0xc20 linux/fs/9p/fid.c:314
 v9fs_vfs_getattr_dotl+0xf9/0x360 linux/fs/9p/vfs_inode_dotl.c:400
 vfs_statx+0xdd/0x4d0 linux/fs/stat.c:248

Freed by:
 p9_fid_destroy (inlined)
 p9_client_clunk+0xb0/0xe0 linux/net/9p/client.c:1456
 p9_fid_put linux/./include/net/9p/client.h:278
 v9fs_dentry_release+0xb5/0x140 linux/fs/9p/vfs_dentry.c:55
 v9fs_remove+0x38f/0x620 linux/fs/9p/vfs_inode.c:518
 vfs_unlink+0x29a/0x810 linux/fs/namei.c:4335

The problem is that d_fsdata was not accessed under d_lock, because
d_release() normally is only called once the dentry is otherwise no
longer accessible but since we also call it explicitly in v9fs_remove
that lock is required:
move the hlist out of the dentry under lock then unref its fids once
they are no longer accessible.

Fixes: 154372e67d40 ("fs/9p: fix create-unlink-getattr idiom")
Cc: stable@vger.kernel.org
Reported-by: Meysam Firouzi
Reported-by: Amirmohammad Eftekhar
Reviewed-by: Christian Schoenebeck &lt;linux_oss@crudebyte.com&gt;
Message-ID: &lt;20240521122947.1080227-1-asmadeus@codewreck.org&gt;
Signed-off-by: Dominique Martinet &lt;asmadeus@codewreck.org&gt;
Signed-off-by: Samasth Norway Ananda &lt;samasth.norway.ananda@oracle.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>fs/9p: drop inodes immediately on non-.L too</title>
<updated>2024-05-17T09:50:55+00:00</updated>
<author>
<name>Joakim Sindholt</name>
<email>opensource@zhasha.com</email>
</author>
<published>2024-03-18T11:22:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=859e2448be413a7cedfbf9bbbf698824eb6b92db'/>
<id>urn:sha1:859e2448be413a7cedfbf9bbbf698824eb6b92db</id>
<content type='text'>
[ Upstream commit 7fd524b9bd1be210fe79035800f4bd78a41b349f ]

Signed-off-by: Joakim Sindholt &lt;opensource@zhasha.com&gt;
Signed-off-by: Eric Van Hensbergen &lt;ericvh@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>9p: explicitly deny setlease attempts</title>
<updated>2024-05-17T09:50:55+00:00</updated>
<author>
<name>Jeff Layton</name>
<email>jlayton@kernel.org</email>
</author>
<published>2024-03-19T16:34:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d6a15d3bb81c12a2e8f1373c0dbdbafeb55835c1'/>
<id>urn:sha1:d6a15d3bb81c12a2e8f1373c0dbdbafeb55835c1</id>
<content type='text'>
[ Upstream commit 7a84602297d36617dbdadeba55a2567031e5165b ]

9p is a remote network protocol, and it doesn't support asynchronous
notifications from the server. Ensure that we don't hand out any leases
since we can't guarantee they'll be broken when a file's contents
change.

Signed-off-by: Jeff Layton &lt;jlayton@kernel.org&gt;
Signed-off-by: Eric Van Hensbergen &lt;ericvh@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>fs/9p: translate O_TRUNC into OTRUNC</title>
<updated>2024-05-17T09:50:55+00:00</updated>
<author>
<name>Joakim Sindholt</name>
<email>opensource@zhasha.com</email>
</author>
<published>2024-03-18T11:22:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2b493bd0da9bfa6717b7e321ddebc24aa0248329'/>
<id>urn:sha1:2b493bd0da9bfa6717b7e321ddebc24aa0248329</id>
<content type='text'>
[ Upstream commit 87de39e70503e04ddb58965520b15eb9efa7eef3 ]

This one hits both 9P2000 and .u as it appears v9fs has never translated
the O_TRUNC flag.

Signed-off-by: Joakim Sindholt &lt;opensource@zhasha.com&gt;
Signed-off-by: Eric Van Hensbergen &lt;ericvh@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>fs/9p: only translate RWX permissions for plain 9P2000</title>
<updated>2024-05-17T09:50:55+00:00</updated>
<author>
<name>Joakim Sindholt</name>
<email>opensource@zhasha.com</email>
</author>
<published>2024-03-18T11:22:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ad4f65328661392de74e3608bb736fedf3b67e32'/>
<id>urn:sha1:ad4f65328661392de74e3608bb736fedf3b67e32</id>
<content type='text'>
[ Upstream commit cd25e15e57e68a6b18dc9323047fe9c68b99290b ]

Garbage in plain 9P2000's perm bits is allowed through, which causes it
to be able to set (among others) the suid bit. This was presumably not
the intent since the unix extended bits are handled explicitly and
conditionally on .u.

Signed-off-by: Joakim Sindholt &lt;opensource@zhasha.com&gt;
Signed-off-by: Eric Van Hensbergen &lt;ericvh@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>9p: v9fs_listxattr: fix %s null argument warning</title>
<updated>2023-11-28T16:56:19+00:00</updated>
<author>
<name>Dominique Martinet</name>
<email>asmadeus@codewreck.org</email>
</author>
<published>2023-10-25T10:34:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e6fbad3cc88098ec341f50b60fa46b98f0bf8652'/>
<id>urn:sha1:e6fbad3cc88098ec341f50b60fa46b98f0bf8652</id>
<content type='text'>
[ Upstream commit 9b5c6281838fc84683dd99b47302d81fce399918 ]

W=1 warns about null argument to kprintf:
In file included from fs/9p/xattr.c:12:
In function ‘v9fs_xattr_get’,
    inlined from ‘v9fs_listxattr’ at fs/9p/xattr.c:142:9:
include/net/9p/9p.h:55:2: error: ‘%s’ directive argument is null
[-Werror=format-overflow=]
   55 |  _p9_debug(level, __func__, fmt, ##__VA_ARGS__)
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Use an empty string instead of :
 - this is ok 9p-wise because p9pdu_vwritef serializes a null string
and an empty string the same way (one '0' word for length)
 - since this degrades the print statements, add new single quotes for
xattr's name delimter (Old: "file = (null)", new: "file = ''")

Link: https://lore.kernel.org/r/20231008060138.517057-1-suhui@nfschina.com
Suggested-by: Su Hui &lt;suhui@nfschina.com&gt;
Signed-off-by: Dominique Martinet &lt;asmadeus@codewreck.org&gt;
Acked-by: Christian Schoenebeck &lt;linux_oss@crudebyte.com&gt;
Message-ID: &lt;20231025103445.1248103-2-asmadeus@codewreck.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>9p: fix a bunch of checkpatch warnings</title>
<updated>2022-08-17T12:24:07+00:00</updated>
<author>
<name>Dominique Martinet</name>
<email>asmadeus@codewreck.org</email>
</author>
<published>2021-11-02T13:16:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=eb3eed52a77cc565cfbc4276e159a27c435558b4'/>
<id>urn:sha1:eb3eed52a77cc565cfbc4276e159a27c435558b4</id>
<content type='text'>
[ Upstream commit 6e195b0f7c8e50927fa31946369c22a0534ec7e2 ]

Sohaib Mohamed started a serie of tiny and incomplete checkpatch fixes but
seemingly stopped halfway -- take over and do most of it.
This is still missing net/9p/trans* and net/9p/protocol.c for a later
time...

Link: http://lkml.kernel.org/r/20211102134608.1588018-3-dominique.martinet@atmark-techno.com
Signed-off-by: Dominique Martinet &lt;asmadeus@codewreck.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>9p: fix fid refcount leak in v9fs_vfs_get_link</title>
<updated>2022-06-29T07:03:19+00:00</updated>
<author>
<name>Dominique Martinet</name>
<email>asmadeus@codewreck.org</email>
</author>
<published>2022-06-12T08:14:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f0126bcaee81dabc1926012126aa74caa03a4c6e'/>
<id>urn:sha1:f0126bcaee81dabc1926012126aa74caa03a4c6e</id>
<content type='text'>
commit e5690f263208c5abce7451370b7786eb25b405eb upstream.

we check for protocol version later than required, after a fid has
been obtained. Just move the version check earlier.

Link: https://lkml.kernel.org/r/20220612085330.1451496-3-asmadeus@codewreck.org
Fixes: 6636b6dcc3db ("9p: add refcount to p9_fid struct")
Cc: stable@vger.kernel.org
Reviewed-by: Tyler Hicks &lt;tyhicks@linux.microsoft.com&gt;
Reviewed-by: Christian Schoenebeck &lt;linux_oss@crudebyte.com&gt;
Signed-off-by: Dominique Martinet &lt;asmadeus@codewreck.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
