<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/fs/9p, branch master</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>Merge tag '9p-for-7.2-rc1' of https://github.com/martinetd/linux</title>
<updated>2026-06-21T17:26:31+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-06-21T17:26:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=1bc18858358d7a4e263a63b59a12cbfd25c16670'/>
<id>1bc18858358d7a4e263a63b59a12cbfd25c16670</id>
<content type='text'>
Pull 9p updates from Dominique Martinet:
 "Asides of the avalanche of LLM-driven fixes, there are a couple of big
  changes this cycle:

   - negative dentry and symlink cache

   - a way out of the unkillable "io_wait_event_killable" (because it
     looped around waiting for the request flush to come back from
     server; this has been bugging syzcaller folks since forever): I'm
     still not 100% sure about this patch, but I think it's as good as
     we'll ever get, and will keep testing a bit further in the coming
     weeks

  The rest is more noisy than usual, but shouldn't cause any trouble"

* tag '9p-for-7.2-rc1' of https://github.com/martinetd/linux:
  9p: Add missing read barrier in virtio zero-copy path
  net/9p: Replace strlen() strcpy() pair with strscpy()
  9p: skip nlink update in cacheless mode to fix WARN_ON
  net/9p: fix race condition on rdma-&gt;state in trans_rdma.c
  9p: v9fs_file_do_lock: replace WARN_ONCE with p9_debug
  9p: Enable symlink caching in page cache
  9p: Set default negative dentry retention time for cache=loose
  9p: Add mount option for negative dentry cache retention
  9p: Cache negative dentries for lookup performance
  9p: avoid returning ERR_PTR(0) from mkdir operations
  9p: avoid putting oldfid in p9_client_walk() error path
  net/9p: fix infinite loop in p9_client_rpc on fatal signal
  docs/filesystems/9p: fix broken external links
  9p: invalidate readdir buffer on seek
  9p: use kvzalloc for readdir buffer
  net/9p/usbg: Constify struct configfs_item_operations
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull 9p updates from Dominique Martinet:
 "Asides of the avalanche of LLM-driven fixes, there are a couple of big
  changes this cycle:

   - negative dentry and symlink cache

   - a way out of the unkillable "io_wait_event_killable" (because it
     looped around waiting for the request flush to come back from
     server; this has been bugging syzcaller folks since forever): I'm
     still not 100% sure about this patch, but I think it's as good as
     we'll ever get, and will keep testing a bit further in the coming
     weeks

  The rest is more noisy than usual, but shouldn't cause any trouble"

* tag '9p-for-7.2-rc1' of https://github.com/martinetd/linux:
  9p: Add missing read barrier in virtio zero-copy path
  net/9p: Replace strlen() strcpy() pair with strscpy()
  9p: skip nlink update in cacheless mode to fix WARN_ON
  net/9p: fix race condition on rdma-&gt;state in trans_rdma.c
  9p: v9fs_file_do_lock: replace WARN_ONCE with p9_debug
  9p: Enable symlink caching in page cache
  9p: Set default negative dentry retention time for cache=loose
  9p: Add mount option for negative dentry cache retention
  9p: Cache negative dentries for lookup performance
  9p: avoid returning ERR_PTR(0) from mkdir operations
  9p: avoid putting oldfid in p9_client_walk() error path
  net/9p: fix infinite loop in p9_client_rpc on fatal signal
  docs/filesystems/9p: fix broken external links
  9p: invalidate readdir buffer on seek
  9p: use kvzalloc for readdir buffer
  net/9p/usbg: Constify struct configfs_item_operations
</pre>
</div>
</content>
</entry>
<entry>
<title>9p: skip nlink update in cacheless mode to fix WARN_ON</title>
<updated>2026-06-21T05:22:57+00:00</updated>
<author>
<name>Breno Leitao</name>
<email>leitao@debian.org</email>
</author>
<published>2026-04-21T09:41:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=574aa0b4799470ac814479f1138d19efe6262255'/>
<id>574aa0b4799470ac814479f1138d19efe6262255</id>
<content type='text'>
v9fs_dec_count() unconditionally calls drop_nlink() on regular files,
even when the inode's nlink is already zero. In cacheless mode the
client refetches inode metadata from the server (the source of truth)
on every operation, so by the time v9fs_remove() returns, the locally
cached nlink may already reflect the post-unlink value:

  1. Client initiates unlink, server processes it and sets nlink to 0
  2. Client refetches inode metadata (nlink=0) before unlink returns
  3. Client's v9fs_remove() completes successfully
  4. Client calls v9fs_dec_count() which calls drop_nlink() on nlink=0

This race is easily triggered under heavy unlink workloads, such as
stress-ng's unlink stressor, producing the following warning:

  WARNING: fs/inode.c:417 at drop_nlink+0x4c/0xc8
  Call trace:
   drop_nlink+0x4c/0xc8
   v9fs_remove+0x1e0/0x250 [9p]
   v9fs_vfs_unlink+0x20/0x38 [9p]
   vfs_unlink+0x13c/0x258
   ...

In cacheless mode the server is authoritative and the inode is on its
way out, so locally adjusting nlink buys nothing. Skip v9fs_dec_count()
entirely when neither CACHE_META nor CACHE_LOOSE is set, which both
avoids the warning and removes a class of nlink races (two concurrent
unlinkers observing nlink &gt; 0 and both calling drop_nlink()) that an
nlink == 0 guard alone would only narrow rather than close.

Fixes: ac89b2ef9b55 ("9p: don't maintain dir i_nlink if the exported fs doesn't either")
Cc: stable@vger.kernel.org
Suggested-by: Dominique Martinet &lt;asmadeus@codewreck.org&gt;
Signed-off-by: Breno Leitao &lt;leitao@debian.org&gt;
Message-ID: &lt;20260421-9p-v2-1-48762d294fad@debian.org&gt;
Signed-off-by: Dominique Martinet &lt;asmadeus@codewreck.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
v9fs_dec_count() unconditionally calls drop_nlink() on regular files,
even when the inode's nlink is already zero. In cacheless mode the
client refetches inode metadata from the server (the source of truth)
on every operation, so by the time v9fs_remove() returns, the locally
cached nlink may already reflect the post-unlink value:

  1. Client initiates unlink, server processes it and sets nlink to 0
  2. Client refetches inode metadata (nlink=0) before unlink returns
  3. Client's v9fs_remove() completes successfully
  4. Client calls v9fs_dec_count() which calls drop_nlink() on nlink=0

This race is easily triggered under heavy unlink workloads, such as
stress-ng's unlink stressor, producing the following warning:

  WARNING: fs/inode.c:417 at drop_nlink+0x4c/0xc8
  Call trace:
   drop_nlink+0x4c/0xc8
   v9fs_remove+0x1e0/0x250 [9p]
   v9fs_vfs_unlink+0x20/0x38 [9p]
   vfs_unlink+0x13c/0x258
   ...

In cacheless mode the server is authoritative and the inode is on its
way out, so locally adjusting nlink buys nothing. Skip v9fs_dec_count()
entirely when neither CACHE_META nor CACHE_LOOSE is set, which both
avoids the warning and removes a class of nlink races (two concurrent
unlinkers observing nlink &gt; 0 and both calling drop_nlink()) that an
nlink == 0 guard alone would only narrow rather than close.

Fixes: ac89b2ef9b55 ("9p: don't maintain dir i_nlink if the exported fs doesn't either")
Cc: stable@vger.kernel.org
Suggested-by: Dominique Martinet &lt;asmadeus@codewreck.org&gt;
Signed-off-by: Breno Leitao &lt;leitao@debian.org&gt;
Message-ID: &lt;20260421-9p-v2-1-48762d294fad@debian.org&gt;
Signed-off-by: Dominique Martinet &lt;asmadeus@codewreck.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>9p: v9fs_file_do_lock: replace WARN_ONCE with p9_debug</title>
<updated>2026-06-21T05:22:57+00:00</updated>
<author>
<name>Dominique Martinet</name>
<email>asmadeus@codewreck.org</email>
</author>
<published>2026-05-29T03:09:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=96a6db3fd7763f676fb6a25658b11aaf0e4fa4f9'/>
<id>96a6db3fd7763f676fb6a25658b11aaf0e4fa4f9</id>
<content type='text'>
This warning depends on server-provided data, we should not use
WARN here

Reported-by: Yifei Chu &lt;yifeichu24@gmail.com&gt;
Closes: https://lore.kernel.org/r/CAPJnbgJ7ZK7DCjCfG56hd_iKGePmAzudb4hOWd4=9r32nM+KcA@mail.gmail.com
Signed-off-by: Dominique Martinet &lt;asmadeus@codewreck.org&gt;
Message-ID: &lt;20260529-lock-warn-v1-1-20c29580d61d@codewreck.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This warning depends on server-provided data, we should not use
WARN here

Reported-by: Yifei Chu &lt;yifeichu24@gmail.com&gt;
Closes: https://lore.kernel.org/r/CAPJnbgJ7ZK7DCjCfG56hd_iKGePmAzudb4hOWd4=9r32nM+KcA@mail.gmail.com
Signed-off-by: Dominique Martinet &lt;asmadeus@codewreck.org&gt;
Message-ID: &lt;20260529-lock-warn-v1-1-20c29580d61d@codewreck.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>9p: Enable symlink caching in page cache</title>
<updated>2026-06-21T05:22:57+00:00</updated>
<author>
<name>Remi Pommarel</name>
<email>repk@triplefau.lt</email>
</author>
<published>2026-05-21T09:40:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=712da38d134b6681946368dd5c9400b43eb772b0'/>
<id>712da38d134b6681946368dd5c9400b43eb772b0</id>
<content type='text'>
Currently, when cache=loose is enabled, file reads are cached in the
page cache, but symlink reads are not. This patch allows the results
of p9_client_readlink() to be stored in the page cache, eliminating
the need for repeated 9P transactions on subsequent symlink accesses.

This change improves performance for workloads that involve frequent
symlink resolution.

Signed-off-by: Remi Pommarel &lt;repk@triplefau.lt&gt;
Message-ID: &lt;982462d17c0c0d2856763266a25eb04d080c1dbb.1779355927.git.repk@triplefau.lt&gt;
Signed-off-by: Dominique Martinet &lt;asmadeus@codewreck.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently, when cache=loose is enabled, file reads are cached in the
page cache, but symlink reads are not. This patch allows the results
of p9_client_readlink() to be stored in the page cache, eliminating
the need for repeated 9P transactions on subsequent symlink accesses.

This change improves performance for workloads that involve frequent
symlink resolution.

Signed-off-by: Remi Pommarel &lt;repk@triplefau.lt&gt;
Message-ID: &lt;982462d17c0c0d2856763266a25eb04d080c1dbb.1779355927.git.repk@triplefau.lt&gt;
Signed-off-by: Dominique Martinet &lt;asmadeus@codewreck.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>9p: Set default negative dentry retention time for cache=loose</title>
<updated>2026-06-21T05:22:57+00:00</updated>
<author>
<name>Remi Pommarel</name>
<email>repk@triplefau.lt</email>
</author>
<published>2026-05-21T09:40:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=15bbf82857fa61de9bad9faa7a3cf3a95b1b292a'/>
<id>15bbf82857fa61de9bad9faa7a3cf3a95b1b292a</id>
<content type='text'>
For cache=loose mounts, set the default negative dentry cache retention
time to 24 hours.

Signed-off-by: Remi Pommarel &lt;repk@triplefau.lt&gt;
Message-ID: &lt;b5beca3e70890ab8a4f0b9e99bd69cb97f5cb9eb.1779355927.git.repk@triplefau.lt&gt;
Signed-off-by: Dominique Martinet &lt;asmadeus@codewreck.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For cache=loose mounts, set the default negative dentry cache retention
time to 24 hours.

Signed-off-by: Remi Pommarel &lt;repk@triplefau.lt&gt;
Message-ID: &lt;b5beca3e70890ab8a4f0b9e99bd69cb97f5cb9eb.1779355927.git.repk@triplefau.lt&gt;
Signed-off-by: Dominique Martinet &lt;asmadeus@codewreck.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>9p: Add mount option for negative dentry cache retention</title>
<updated>2026-06-21T05:22:56+00:00</updated>
<author>
<name>Remi Pommarel</name>
<email>repk@triplefau.lt</email>
</author>
<published>2026-05-21T09:40:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=5670a84b5cda6b82016282accfd61ef36aceafbf'/>
<id>5670a84b5cda6b82016282accfd61ef36aceafbf</id>
<content type='text'>
Introduce a new mount option, negtimeout, for v9fs that allows users
to specify how long negative dentries are retained in the cache. The
retention time can be set in milliseconds (e.g. negtimeout=10000 for
a 10secs retention time) or a negative value (e.g. negtimeout=-1) to
keep negative entries until the buffer cache management removes them.

For consistency reasons, this option should only be used in exclusive
or read-only mount scenarios, aligning with the cache=loose usage.

Signed-off-by: Remi Pommarel &lt;repk@triplefau.lt&gt;
Message-ID: &lt;b2d66500aa5a2f6540347c4aa46a4be10dd01bc6.1779355927.git.repk@triplefau.lt&gt;
Signed-off-by: Dominique Martinet &lt;asmadeus@codewreck.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Introduce a new mount option, negtimeout, for v9fs that allows users
to specify how long negative dentries are retained in the cache. The
retention time can be set in milliseconds (e.g. negtimeout=10000 for
a 10secs retention time) or a negative value (e.g. negtimeout=-1) to
keep negative entries until the buffer cache management removes them.

For consistency reasons, this option should only be used in exclusive
or read-only mount scenarios, aligning with the cache=loose usage.

Signed-off-by: Remi Pommarel &lt;repk@triplefau.lt&gt;
Message-ID: &lt;b2d66500aa5a2f6540347c4aa46a4be10dd01bc6.1779355927.git.repk@triplefau.lt&gt;
Signed-off-by: Dominique Martinet &lt;asmadeus@codewreck.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>9p: Cache negative dentries for lookup performance</title>
<updated>2026-06-21T05:22:56+00:00</updated>
<author>
<name>Remi Pommarel</name>
<email>repk@triplefau.lt</email>
</author>
<published>2026-05-21T09:40:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=f00e6c1d282578b077b87b88f42e701bc40f2fff'/>
<id>f00e6c1d282578b077b87b88f42e701bc40f2fff</id>
<content type='text'>
Not caching negative dentries can result in poor performance for
workloads that repeatedly look up non-existent paths. Each such
lookup triggers a full 9P transaction with the server, adding
unnecessary overhead.

A typical example is source compilation, where multiple cc1 processes
are spawned and repeatedly search for the same missing header files
over and over again.

This change enables caching of negative dentries, so that lookups for
known non-existent paths do not require a full 9P transaction. The
cached negative dentries are retained for a configurable duration
(expressed in milliseconds), as specified by the ndentry_timeout
field in struct v9fs_session_info. If set to -1, negative dentries
are cached indefinitely.

This optimization reduces lookup overhead and improves performance for
workloads involving frequent access to non-existent paths.

Signed-off-by: Remi Pommarel &lt;repk@triplefau.lt&gt;
Message-ID: &lt;e542317dd03bbadb5249abd3ea6aecfdca692c19.1779355927.git.repk@triplefau.lt&gt;
Signed-off-by: Dominique Martinet &lt;asmadeus@codewreck.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Not caching negative dentries can result in poor performance for
workloads that repeatedly look up non-existent paths. Each such
lookup triggers a full 9P transaction with the server, adding
unnecessary overhead.

A typical example is source compilation, where multiple cc1 processes
are spawned and repeatedly search for the same missing header files
over and over again.

This change enables caching of negative dentries, so that lookups for
known non-existent paths do not require a full 9P transaction. The
cached negative dentries are retained for a configurable duration
(expressed in milliseconds), as specified by the ndentry_timeout
field in struct v9fs_session_info. If set to -1, negative dentries
are cached indefinitely.

This optimization reduces lookup overhead and improves performance for
workloads involving frequent access to non-existent paths.

Signed-off-by: Remi Pommarel &lt;repk@triplefau.lt&gt;
Message-ID: &lt;e542317dd03bbadb5249abd3ea6aecfdca692c19.1779355927.git.repk@triplefau.lt&gt;
Signed-off-by: Dominique Martinet &lt;asmadeus@codewreck.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>9p: avoid returning ERR_PTR(0) from mkdir operations</title>
<updated>2026-06-21T05:22:56+00:00</updated>
<author>
<name>Hongling Zeng</name>
<email>zenghongling@kylinos.cn</email>
</author>
<published>2026-05-20T02:26:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=314b58c01a9047567fd19446ca5fd46c473b89ff'/>
<id>314b58c01a9047567fd19446ca5fd46c473b89ff</id>
<content type='text'>
When mkdir succeeds, v9fs_vfs_mkdir_dotl() and v9fs_vfs_mkdir() return
ERR_PTR(0) which is incorrect. They should return NULL instead for
success and ERR_PTR() only with negative error codes for failure.

Return NULL instead of passing to ERR_PTR while err is zero
Fixes smatch warnings:
  fs/9p/vfs_inode_dotl.c:420 v9fs_vfs_mkdir_dotl() warn: passing zero to 'ERR_PTR'
  fs/9p/vfs_inode.c:695 v9fs_vfs_mkdir() warn: passing zero to 'ERR_PTR'

The v9fs_vfs_mkdir() code was further simplified because v9fs_create()
can never return NULL, so we do not need to check for fid being set
separately, and the error path can be a simple return immediately after
v9fs_create() failure.
There is no intended functional change.

Fixes: 88d5baf69082 ("Change inode_operations.mkdir to return struct dentry *")
Suggested-by: David Laight &lt;david.laight.linux@gmail.com&gt;
Acked-by: Christian Schoenebeck &lt;linux_oss@crudebyte.com&gt;
Signed-off-by: Hongling Zeng &lt;zenghongling@kylinos.cn&gt;
Message-ID: &lt;20260520022650.14217-1-zenghongling@kylinos.cn&gt;
Signed-off-by: Dominique Martinet &lt;asmadeus@codewreck.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When mkdir succeeds, v9fs_vfs_mkdir_dotl() and v9fs_vfs_mkdir() return
ERR_PTR(0) which is incorrect. They should return NULL instead for
success and ERR_PTR() only with negative error codes for failure.

Return NULL instead of passing to ERR_PTR while err is zero
Fixes smatch warnings:
  fs/9p/vfs_inode_dotl.c:420 v9fs_vfs_mkdir_dotl() warn: passing zero to 'ERR_PTR'
  fs/9p/vfs_inode.c:695 v9fs_vfs_mkdir() warn: passing zero to 'ERR_PTR'

The v9fs_vfs_mkdir() code was further simplified because v9fs_create()
can never return NULL, so we do not need to check for fid being set
separately, and the error path can be a simple return immediately after
v9fs_create() failure.
There is no intended functional change.

Fixes: 88d5baf69082 ("Change inode_operations.mkdir to return struct dentry *")
Suggested-by: David Laight &lt;david.laight.linux@gmail.com&gt;
Acked-by: Christian Schoenebeck &lt;linux_oss@crudebyte.com&gt;
Signed-off-by: Hongling Zeng &lt;zenghongling@kylinos.cn&gt;
Message-ID: &lt;20260520022650.14217-1-zenghongling@kylinos.cn&gt;
Signed-off-by: Dominique Martinet &lt;asmadeus@codewreck.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>9p: invalidate readdir buffer on seek</title>
<updated>2026-05-19T11:58:18+00:00</updated>
<author>
<name>Pierre Barre</name>
<email>pierre@barre.sh</email>
</author>
<published>2026-05-12T13:20:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=e661e17ddbed524b5fbda789a091b48b6b677067'/>
<id>e661e17ddbed524b5fbda789a091b48b6b677067</id>
<content type='text'>
The per-fid readdir buffer (fid-&gt;rdir) is populated lazily and only
refilled when fully drained (rdir-&gt;head == rdir-&gt;tail). userspace
lseek() on a directory fd updates file-&gt;f_pos via generic_file_llseek()
but does not touch the cached buffer, so the next getdents() iterates
the stale cache and emits entries from the previous position instead
of the one the caller asked for.

Track the file position the cached data corresponds to in
struct p9_rdir, and drop the cache on entry to iterate_shared when it
no longer matches ctx-&gt;pos. The 9p protocol's Tread/Treaddir already
take an arbitrary offset on every request, so a refill at the new
position is always legal; no .llseek override or seek restriction is
needed.

Reported-by: Pierre Barre &lt;pierre@barre.sh&gt;
Link: https://lore.kernel.org/v9fs/496d10b9-40fe-4f81-8014-37497c37ff63@app.fastmail.com/
Signed-off-by: Pierre Barre &lt;pierre@barre.sh&gt;
Message-ID: &lt;20260512132032.369281-2-pierre@barre.sh&gt;
Signed-off-by: Dominique Martinet &lt;asmadeus@codewreck.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The per-fid readdir buffer (fid-&gt;rdir) is populated lazily and only
refilled when fully drained (rdir-&gt;head == rdir-&gt;tail). userspace
lseek() on a directory fd updates file-&gt;f_pos via generic_file_llseek()
but does not touch the cached buffer, so the next getdents() iterates
the stale cache and emits entries from the previous position instead
of the one the caller asked for.

Track the file position the cached data corresponds to in
struct p9_rdir, and drop the cache on entry to iterate_shared when it
no longer matches ctx-&gt;pos. The 9p protocol's Tread/Treaddir already
take an arbitrary offset on every request, so a refill at the new
position is always legal; no .llseek override or seek restriction is
needed.

Reported-by: Pierre Barre &lt;pierre@barre.sh&gt;
Link: https://lore.kernel.org/v9fs/496d10b9-40fe-4f81-8014-37497c37ff63@app.fastmail.com/
Signed-off-by: Pierre Barre &lt;pierre@barre.sh&gt;
Message-ID: &lt;20260512132032.369281-2-pierre@barre.sh&gt;
Signed-off-by: Dominique Martinet &lt;asmadeus@codewreck.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>9p: use kvzalloc for readdir buffer</title>
<updated>2026-05-19T11:58:18+00:00</updated>
<author>
<name>Pierre Barre</name>
<email>pierre@barre.sh</email>
</author>
<published>2026-05-12T13:20:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=b4d71bea144550ff4a0917f8c4b06d4063eb27a6'/>
<id>b4d71bea144550ff4a0917f8c4b06d4063eb27a6</id>
<content type='text'>
The readdir buffer is sized to msize, so kzalloc() can fail under
fragmentation with a page allocation failure in v9fs_alloc_rdir_buf()
/ v9fs_dir_readdir_dotl().

The buffer is only a response sink and is never pack_sg_list()'d,
so kvzalloc() is safe for all transports, unlike the fcall buffers
fixed in e21d451a82f3 ("9p: Use kvmalloc for message buffers on
supported transports").

Signed-off-by: Pierre Barre &lt;pierre@barre.sh&gt;
Message-ID: &lt;20260512132032.369281-1-pierre@barre.sh&gt;
Signed-off-by: Dominique Martinet &lt;asmadeus@codewreck.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The readdir buffer is sized to msize, so kzalloc() can fail under
fragmentation with a page allocation failure in v9fs_alloc_rdir_buf()
/ v9fs_dir_readdir_dotl().

The buffer is only a response sink and is never pack_sg_list()'d,
so kvzalloc() is safe for all transports, unlike the fcall buffers
fixed in e21d451a82f3 ("9p: Use kvmalloc for message buffers on
supported transports").

Signed-off-by: Pierre Barre &lt;pierre@barre.sh&gt;
Message-ID: &lt;20260512132032.369281-1-pierre@barre.sh&gt;
Signed-off-by: Dominique Martinet &lt;asmadeus@codewreck.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
