<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/git/stable/linux-stable.git/net/sunrpc, branch master</title>
<subtitle>Linux kernel stable tree</subtitle>
<id>https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/atom?h=master</id>
<link rel='self' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/'/>
<updated>2026-08-26T22:09:21+00:00</updated>
<entry>
<title>Merge tag 'nfs-for-7.3-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs</title>
<updated>2026-08-26T22:09:21+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-08-26T22:09:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=73e3f0710014fe6d4ed98cfc02292f6121db7558'/>
<id>urn:sha1:73e3f0710014fe6d4ed98cfc02292f6121db7558</id>
<content type='text'>
Pull NFS client updates from Trond Myklebust:
 "Highlights include:

  Stable fixes:
   - Use-after-free fixes for the sunrpc client code
   - Delegation hash table leak
   - NULL dereference on lockowner allocation failure
   - Fix a handshake completion race in the TLS code
   - Fix an error sign checking issue when deciding whether the pNFS
     layout is still in use, or can be returned
   - Fix a layout segment leak in pnfs_layout_process()

  Other bugfixes:
   - Fix a missing NULL check in the rpcbind client
   - annotate shared socket callbacks with READ_ONCE/WRITE_ONCE
   - nfs_inode_set_delegation() error paths should return the delegation
   - Use clear_and_wake_up_bit() in nfs_clear_invalid_mapping() and the
     pNFS code.
   - Fix the nfs4_alloc_client() error paths to free the IDR allocation
   - fix folio dereference before NULL check in
     nfs_inode_remove_request()
   - Fix delayed delegation return
   - Fix another state manager race with umount
   - Fix device leaks on parse failure
   - Avoid cancelling in-flight I/O during a layout recall if the server
     doesn't require it
   - flexfiles: report cancelled I/O as a layout error
   - flexfiles: fix NULL dereference for NFSv4.0 data servers
   - Fix incorrect argument passed to nfs4_delete_lease()
   - Fix several symlink issues resulting from nfs_atomic_open_v23()
   - Fix an uninitialised variable issue in the NFSv4.1 callback code
   - fix LAYOUTSTATS send buffer exhaustion

  Features and cleanups:
   - NFSv4.2: Allow the server to specify that file data may not be cached
   - localio: optimise I/O submission when when not doing memory reclaim
   - localio: Remove duplicate wait code in nfs_local_commit
   - flexfiles: support loosely coupled NFSv4.x data servers
   - pNFS: key the data server cache on the NFS version"

* tag 'nfs-for-7.3-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (33 commits)
  NFSv4.1: fix layout segment leak on the pnfs_layout_process() forget path
  NFSv4/pnfs: key the data server cache on the NFS version
  NFSv4.2: fix LAYOUTSTATS send buffer exhaustion
  pNFS: Fix EBUSY check in pnfs_layout_need_return
  NFSv4.1: zero referring call lists before decoding
  nfs: fix ENXIO on O_CREAT open of existing symlink over NFSv3
  SUNRPC: wait for in-flight client TLS handshake callback
  NFSv4: Fix incorrect argument passed to nfs4_delete_lease() in nfs4_add_lease()
  lockd: fix NULL dereference on lockowner allocation failure
  NFS: fix delegation_hash_table leak when nfs4_server_common_setup() fails
  NFSv4/flexfiles: support loosely coupled data servers
  NFSv4/flexfiles: fix NULL dereference for NFSv4.0 data servers
  NFSv4: pin the superblock for active state owners
  sunrpc: fix use-after-free in __rpc_clnt_handle_event and __rpc_clnt_remove_pipedir
  NFS/localio: issue commit inline when not in a memory-reclaim context
  NFS/localio: remove dead FLUSH_SYNC handling from nfs_local_commit
  NFS/localio: issue IO inline when not in a memory-reclaim context
  NFS: Fix delayed delegation return list handling
  NFS: Verify symlink inode before caching target
  NFS: fix folio dereference before NULL check in nfs_inode_remove_request()
  ...
</content>
</entry>
<entry>
<title>Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma</title>
<updated>2026-08-21T18:48:54+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-08-21T18:48:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=21bd0802cd3f58b656065f1be236694c40588c3a'/>
<id>urn:sha1:21bd0802cd3f58b656065f1be236694c40588c3a</id>
<content type='text'>
Pull RDMA updates from Jason Gunthorpe:
 "About the normal size, still a lot of AI bug fixes and so on, but some
  interesting new functionality too:

   - Assorted locking, bounds-checking, cleanup, and error-path fixes
     across UCMA/CMA, bng_re, bnxt_re, cxgb4, EFA, ERDMA, HFI1, HNS,
     ionic, iRDMA, mlx4/mlx5, RXE, SIW, SRP/SRPT, and iSER target.

   - netlink report for max # of supported resources

   - get_zeroed_page()/etc removal

   - Robust udata for ionic

   - Allow unique RDMA device names per network namespace

   - Completion counters and v2 admit queue support for EFA

   - UC QP support for MANA

   - Completion timestamps for ionic

   - Harden uverbs data validation and resource lifetime handling,
     fixing several core use-after-free conditions.

   - bnxt_re toggle-page ownership and lifetime bug fixes

   - dmabuf SRQ support for mlx5"

* tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: (160 commits)
  RDMA/ucma: Allow path records to exactly fit the output buffer
  RDMA/uverbs: Guard legacy bundles without method_elm
  RDMA/efa: Add support for 128B admin v2 SQ entry
  RDMA/efa: Generalize the admin SQ
  RDMA/efa: Decouple admin command payload from admin header
  RDMA/rxe: Fix OOB in free_rd_atomic_resources()
  RDMA/cma: Fix WARNING in res_to_rt
  RDMA/cxgb4: Free debugfs on registration failure
  RDMA/cxgb4: Cancel reg_work before freeing device on remove
  RDMA/ucma: Lock the handler in ucma_set_ib_path()
  RDMA/ucma: Lock the handler in ucma_write_cm_event()
  RDMA/erdma: restrict the driver to little-endian systems
  RDMA/ionic: Embed counter driver data in rdma_counter allocation
  RDMA/ionic: Cap eq_count to the eth driver's interrupt vector budget
  RDMA/siw: Fix use-after-free in siw_accept()
  IB/isert: post the full-feature receive buffers after session registration
  IB/isert: delay the final Login Response until the session is registered
  RDMA/srp: fix heap information leak on a truncated SRP_CRED_REQ
  RDMA/erdma: Hold QP references for AE and CM processing
  RDMA/erdma: Hold CQ references when processing EQ events
  ...
</content>
</entry>
<entry>
<title>SUNRPC: wait for in-flight client TLS handshake callback</title>
<updated>2026-08-17T16:02:08+00:00</updated>
<author>
<name>Jérémy Jean</name>
<email>Jeremy.Jean@oss.cyber.gouv.fr</email>
</author>
<published>2026-08-09T17:07:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=a89dd597458848b463d284b15e42a8078beeb046'/>
<id>urn:sha1:a89dd597458848b463d284b15e42a8078beeb046</id>
<content type='text'>
xs_tls_handshake_sync() gives xs_tls_handshake_done() a reference to the
lower transport before submitting the handshake request. On timeout or
signal, the synchronous waiter drops that reference after calling
tls_handshake_cancel().

handshake_req_cancel() returns false when handshake_complete() has
already marked the request complete. In that case the completion callback
can still be running, so dropping the callback-owned reference in the
waiter can free the lower transport before xs_tls_handshake_done() stores
xprt_err or drops its own reference.

If cancellation loses to completion, wait until xs_tls_handshake_done()
signals handshake_done and let the callback release its reference. This
mirrors the server-side handshake lifetime handling and keeps the timeout
or signal return value unchanged.

Fixes: 75eb6af7acdf ("SUNRPC: Add a TCP-with-TLS RPC transport class")
Cc: stable@vger.kernel.org
Assisted-by: Codex:gpt-5
Signed-off-by: Jérémy Jean &lt;Jeremy.Jean@oss.cyber.gouv.fr&gt;
Reviewed-by: Chuck Lever &lt;cel@kernel.org&gt;
Signed-off-by: Trond Myklebust &lt;trond.myklebust@hammerspace.com&gt;
</content>
</entry>
<entry>
<title>sunrpc: fix use-after-free in __rpc_clnt_handle_event and __rpc_clnt_remove_pipedir</title>
<updated>2026-08-17T16:02:08+00:00</updated>
<author>
<name>Luxiao Xu</name>
<email>rakukuip@gmail.com</email>
</author>
<published>2026-07-07T05:20:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=932a8cf6abb2b2f8677b79153a823108d8861fe2'/>
<id>urn:sha1:932a8cf6abb2b2f8677b79153a823108d8861fe2</id>
<content type='text'>
Normal client creation goes through rpc_setup_pipedir(), which records
clnt-&gt;pipefs_sb, but the mount-event path in __rpc_clnt_handle_event()
calls rpc_setup_pipedir_sb() directly and never refreshes that field.
The umount path also removes the directory without clearing
clnt-&gt;pipefs_sb.

After a late pipefs mount or any remount, rpc_clnt_remove_pipedir()
compares the current superblock against a stale pipefs_sb pointer and
skips cleanup, leaving pipefs dentries whose inode private data still
points at a freed rpc_clnt, leading to a potential use-after-free during
subsequent rpc_info_open() or rpc_show_info() calls.

Fix this by properly updating clnt-&gt;pipefs_sb upon mount events and
clearing it during unmount or failure paths.

Fixes: bfca5fb4e97c ("SUNRPC: Fix RPC client cleaned up the freed pipefs dentries")
Cc: stable@vger.kernel.org
Reported-by: Yuan Tan &lt;yuantan098@gmail.com&gt;
Reported-by: Xin Liu &lt;dstsmallbird@foxmail.com&gt;
Reviewed-by: Ren Wei &lt;enjou1224z@gmail.com&gt;
Assisted-by: Codex:gpt-5.4
Signed-off-by: Luxiao Xu &lt;rakukuip@gmail.com&gt;
Signed-off-by: Trond Myklebust &lt;trond.myklebust@hammerspace.com&gt;
</content>
</entry>
<entry>
<title>sunrpc: xprtsock: annotate shared socket callbacks with READ_ONCE/WRITE_ONCE</title>
<updated>2026-08-10T17:28:23+00:00</updated>
<author>
<name>Runyu Xiao</name>
<email>runyu.xiao@seu.edu.cn</email>
</author>
<published>2026-06-11T05:35:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=33930840b5f0a79f826e7c69dc6cd78f72a67481'/>
<id>urn:sha1:33930840b5f0a79f826e7c69dc6cd78f72a67481</id>
<content type='text'>
xprtsock replaces and restores sk-&gt;sk_data_ready and
sk-&gt;sk_write_space on live sockets with plain stores, and
xs_udp_do_set_buffer_size() invokes sk-&gt;sk_write_space via a plain
load. These callback pointers are shared with generic socket and
protocol paths that may read or invoke them concurrently, so xprtsock
needs the same READ_ONCE()/WRITE_ONCE() callback visibility contract
that the validated 4022 family applied elsewhere.

When SUNRPC takes over an AF_LOCAL, UDP, or TCP socket and later
restores the lower-socket callbacks during teardown, another CPU may
still hold an earlier callback snapshot. The plain replace/restore
pattern leaves the same visibility hole as the validated 4022 family,
so a stale snapshot can still invoke xs_data_ready() or
xs_udp_write_space() after the live callback fields have already been
restored to the lower-socket handlers.

Use WRITE_ONCE() for the shared sk_data_ready and sk_write_space
stores in xs_local_finish_connecting(), xs_udp_finish_connecting(),
xs_tcp_finish_connecting(), and xs_restore_old_callbacks(). Use
READ_ONCE() for the direct sk_write_space invocation in
xs_udp_do_set_buffer_size(). This matches the required callback
visibility contract while leaving adjacent sk_state_change and
sk_error_report handling unchanged.

Fixes: a246b0105bbd ("[PATCH] RPC: introduce client-side transport switch")
Signed-off-by: Runyu Xiao &lt;runyu.xiao@seu.edu.cn&gt;
Signed-off-by: Trond Myklebust &lt;trond.myklebust@hammerspace.com&gt;
</content>
</entry>
<entry>
<title>SUNRPC: check rpc_sockaddr2uaddr() return value in rpcb_register_inet4/6</title>
<updated>2026-08-10T17:28:23+00:00</updated>
<author>
<name>Weiming Shi</name>
<email>bestswngs@gmail.com</email>
</author>
<published>2026-06-07T14:06:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=fd22370226a0d8109045d0831fd5aaadee921693'/>
<id>urn:sha1:fd22370226a0d8109045d0831fd5aaadee921693</id>
<content type='text'>
rpcb_register_inet4() and rpcb_register_inet6() store the result of
rpc_sockaddr2uaddr() into map-&gt;r_addr without checking it for NULL.
rpc_sockaddr2uaddr() returns NULL when its final kstrdup() fails, and
the unchecked NULL is then carried into the synchronous RPCBPROC_SET
encode path: rpcb_register_call() -&gt; rpc_call_sync() -&gt;
rpcb_enc_getaddr() -&gt; encode_rpcb_string(), whose first statement is
strlen(string), dereferencing NULL and oopsing the kernel.

The crash reproduces under failslab on v6.12; with KASAN the NULL
dereference surfaces as a fault on the shadow of address zero:

 Oops: general protection fault, probably for non-canonical address
       0xdffffc0000000000 [#1] PREEMPT SMP KASAN
 RIP: 0010:strlen (lib/string.c:409)
 Call Trace:
  encode_rpcb_string (net/sunrpc/rpcb_clnt.c:890)
  rpcb_enc_getaddr (net/sunrpc/rpcb_clnt.c:910)
  rpcauth_wrap_req_encode (net/sunrpc/auth.c:745)
  call_encode (net/sunrpc/clnt.c:1966)
  __rpc_execute (net/sunrpc/sched.c:952)
  rpc_run_task (net/sunrpc/clnt.c:1243)
  rpc_call_sync (net/sunrpc/clnt.c:1272)
  rpcb_v4_register (net/sunrpc/rpcb_clnt.c:500)
  svc_generic_rpcbind_set
  nfsd_rpcbind_set
  svc_register
  svc_setup_socket
  svc_addsock
  write_ports
  nfsctl_transaction_write
  vfs_write

The crash is reachable when an in-kernel RPC service (nfsd, lockd,
nfs-callback) registers with the local rpcbind under enough memory
pressure for the small GFP_KERNEL kstrdup() in rpc_sockaddr2uaddr() to
fail. The asynchronous getport path already handles this exact failure
mode by returning -ENOMEM; only the two register helpers omit the check.

Mirror that handling: bail out with -ENOMEM when rpc_sockaddr2uaddr()
returns NULL, before the address is fed into the encoder.

Fixes: d77385f23830 ("SUNRPC: Fix rpc_sockaddr2uaddr")
Reported-by: Xiang Mei &lt;xmei5@asu.edu&gt;
Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Weiming Shi &lt;bestswngs@gmail.com&gt;
Reviewed-by: Jeff Layton &lt;jlayton@kernel.org&gt;
Signed-off-by: Trond Myklebust &lt;trond.myklebust@hammerspace.com&gt;
</content>
</entry>
<entry>
<title>sunrpc: remove unused svc_version vs_count field</title>
<updated>2026-08-10T13:54:35+00:00</updated>
<author>
<name>Jeff Layton</name>
<email>jlayton@kernel.org</email>
</author>
<published>2026-07-17T11:08:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=5e4c283cb32f5d66618ffa9b5403ea09a60f2b61'/>
<id>urn:sha1:5e4c283cb32f5d66618ffa9b5403ea09a60f2b61</id>
<content type='text'>
Now that svc_seq_show() and the nfsd netlink stats handler both use
the per-netns svc_stat vs_count arrays, the global per-version
vs_count percpu counters are no longer read by anything. Remove the
vs_count field from struct svc_version and all the associated
DEFINE_PER_CPU_ALIGNED arrays and initializers across nfsd, lockd,
and the NFS client callback service.

Assisted-by: LLM
Signed-off-by: Jeff Layton &lt;jlayton@kernel.org&gt;
Link: https://patch.msgid.link/20260717-exportd-netlink-v7-4-b7ce17b83b60@kernel.org
Signed-off-by: Chuck Lever &lt;cel@kernel.org&gt;
</content>
</entry>
<entry>
<title>sunrpc: use per-net counts in svc_seq_show()</title>
<updated>2026-08-10T13:54:35+00:00</updated>
<author>
<name>Jeff Layton</name>
<email>jlayton@kernel.org</email>
</author>
<published>2026-07-17T11:08:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=c1cd8442174afafbbd61799203145eae80b2163c'/>
<id>urn:sha1:c1cd8442174afafbbd61799203145eae80b2163c</id>
<content type='text'>
Update svc_seq_show() to read from the per-netns
statp-&gt;vs_count[] arrays instead of the global
svc_version-&gt;vs_count[].

The only caller is nfsd, which always allocates vs_count via
svc_stat_alloc_counts() in nfsd_net_init(), so the per-netns
arrays are always available.

This makes /proc/net/rpc/nfsd report per-network-namespace
procedure call counts.

Assisted-by: LLM
Signed-off-by: Jeff Layton &lt;jlayton@kernel.org&gt;
Link: https://patch.msgid.link/20260717-exportd-netlink-v7-2-b7ce17b83b60@kernel.org
Signed-off-by: Chuck Lever &lt;cel@kernel.org&gt;
</content>
</entry>
<entry>
<title>sunrpc: add per-netns per-procedure call counts to svc_stat</title>
<updated>2026-08-10T13:54:35+00:00</updated>
<author>
<name>Jeff Layton</name>
<email>jlayton@kernel.org</email>
</author>
<published>2026-07-17T11:08:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=f1775ed34ed3ecf1289588574b892aa9584e6ef3'/>
<id>urn:sha1:f1775ed34ed3ecf1289588574b892aa9584e6ef3</id>
<content type='text'>
The existing per-procedure call counts live in global
svc_version-&gt;vs_count[] arrays which are not network-namespace-aware.
Add per-netns equivalents in struct svc_stat so the upcoming netlink
stats interface can return namespace-scoped statistics.

Add a vs_count pointer array to struct svc_stat, along with
svc_stat_alloc_counts() and svc_stat_free_counts() helpers to manage
per-version percpu call count arrays.

Increment the per-net counter alongside the global one in
svc_generic_init_request(). Call the alloc/free helpers from
nfsd_net_init() and nfsd_net_exit().

Assisted-by: LLM
Signed-off-by: Jeff Layton &lt;jlayton@kernel.org&gt;
Link: https://patch.msgid.link/20260717-exportd-netlink-v7-1-b7ce17b83b60@kernel.org
Signed-off-by: Chuck Lever &lt;cel@kernel.org&gt;
</content>
</entry>
<entry>
<title>sunrpc: derive the pool count instead of caching it in sv_nrpools</title>
<updated>2026-08-10T13:54:35+00:00</updated>
<author>
<name>Jeff Layton</name>
<email>jlayton@kernel.org</email>
</author>
<published>2026-07-06T13:29:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=91141b8eb9c9d2580b073688c6b0ee2ba3718b34'/>
<id>urn:sha1:91141b8eb9c9d2580b073688c6b0ee2ba3718b34</id>
<content type='text'>
Now that the pool mode is always pernode, svc_serv.sv_nrpools is
redundant with sv_is_pooled: an unpooled service always has a single
pool, and a pooled service has svc_pool_map.npools pools (which is one on
a single-node host). sv_nrpools cannot distinguish an unpooled service
from a pooled service that happens to have one pool, so it is sv_nrpools,
not sv_is_pooled, that carries no unique information.

Replace the cached field with a svc_serv_nrpools() helper that derives
the count from sv_is_pooled and the pool map, and convert all readers to
it. svc_pool_map is file-local to svc.c, so export the helper for the
svc_xprt.c and nfsd callers.

Reading svc_pool_map.npools without svc_pool_map_mutex is safe: the
mutex protects only svc_pool_map.count, and npools is already read
locklessly in svc_pool_for_cpu().

A pooled service holds a map reference for its whole lifetime, so npools
is stable while any reader could observe it.  The hot path
(svc_pool_for_cpu()) already dereferences svc_pool_map for to_pool, and
npools shares that cacheline, so there is no new locking or coherence
cost.

__svc_create() keeps using its local npools argument for the sv_pools[]
allocation, since sv_is_pooled is not set until svc_create_pooled() has
returned from it.

Doing this also removes a modulus operation from svc_pool_for_cpu(),
which should make for more efficient RPC queueing.

Assisted-by: Claude:claude-opus-4-8
Suggested-by: NeilBrown &lt;neilb@ownmail.net&gt;
Signed-off-by: Jeff Layton &lt;jlayton@kernel.org&gt;
Link: https://patch.msgid.link/20260706-sunrpc-pool-mode-v5-5-6c4ee7cd89aa@kernel.org
Signed-off-by: Chuck Lever &lt;cel@kernel.org&gt;
</content>
</entry>
</feed>
