commit 7acc8b943c9ae89c711712c73df64b46572a44c9 Author: zhangjian Date: Tue Jul 21 11:53:32 2026 -0400 nfsd: fix memory overflow for haddr when hcounter is not 0, haddr memory is not enough. asan report heap-buffer-overflow error in following scene: CFLAGS="-fsanitize=address -g" ./configure && make ./utils/nfsd/nfsd -H 192.168.1.1 -H 192.168.1.2 Signed-off-by: zhangjian Signed-off-by: Steve Dickson commit 97f878a7cb0ef90db431e1945c64ccd65f45872e Author: zhangjian Date: Tue Jul 21 11:51:23 2026 -0400 gssd: fix memory leak in gssd_free_client clp->servername is always not null, so upcall_* is never free. Signed-off-by: zhangjian Signed-off-by: Steve Dickson commit 6eca2e72a5e9d9a4a576b947b93fd631c9975378 Author: Scott Mayhew Date: Wed Jul 15 06:50:09 2026 -0400 Pass ignore_hosts to export_create() in export_read() Commit 8f3d12ce ("nfs-server-generator: avoid using external services.") added the 'ignore_hosts' flag to export_read() so nfs-server-generator can bypass DNS queries when calling it. If the export doesn't already exist, export_read() calls export_create() with the 'canonical' argument hard-coded to 0, triggering a DNS query in client_lookup(). An unresponsive DNS server can cause delays in nfs-server-generator and can even lead to 'systemctl daemon-reload' timing out, leading to further administrative issues. nfs-server-generator only cares about *what* is exported, so it can create the order-with-mounts.conf config drop-in. It doesn't need to know *who* those filesystems are exported to, so it has no need to perform DNS queries. Pass the 'ignore_hosts' flag from export_read() to export_create() to avoid the unnecessary DNS queries. Fixes: 8f3d12ce ("nfs-server-generator: avoid using external services.") Signed-off-by: Scott Mayhew Signed-off-by: Steve Dickson commit 1cee94256fe261a20eebf33d68b4e7c7477555a1 Author: Scott Mayhew Date: Sat Jul 11 06:25:54 2026 -0400 mountd/exportd: disable netlink when falling back to /proc If cache_flush() has to fall back to the /proc interface, then there's a good chance that the netlink interface isn't going to work, so go ahead and disable it. The netlink interface requires CAP_NET_ADMIN, which requires a policy update on systems running SELinux. If SELinux blocks mountd from using the netlink interface and there's no fallback, then mount requests just hang. Also, when falling back, close both the sunrpc and the nfsd netlink sockets. Reviewed-by: Jeff Layton Signed-off-by: Scott Mayhew Signed-off-by: Steve Dickson commit 9150db0c39f7919b20c8490af4620b9ac8b98b11 Author: Scott Mayhew Date: Sat Jul 11 06:21:44 2026 -0400 nfs.conf: add no-netlink option to exportd and mountd stanzas This option was added by commit 60c38383 ("mountd/exportd/exportfs: add --no-netlink option to disable netlink"), but nfs.conf was not updated. Reviewed-by: Jeff Layton Signed-off-by: Scott Mayhew Signed-off-by: Steve Dickson commit ce516adb34572722eb177d23fbb6e01e2461455e Author: Scott Mayhew Date: Sat Jul 11 06:19:14 2026 -0400 configure: update check of system netlink headers Commit e1401387 ("nfsstat: add netlink support for fetching server statistics") added new symbols to support/include/nfsd_netlink.h that have not yet been added to the kernel headers. Update the check that defines USE_SYSTEM_NFSD_NETLINK_H - otherwise nfsstat will fail to compile. Reviewed-by: Jeff Layton Signed-off-by: Scott Mayhew Signed-off-by: Steve Dickson commit 77138df84971395c415d882c589c5e563204d06b Author: Thiago Becker Date: Sat Jul 11 06:15:35 2026 -0400 rpc.gssd: Call pthread_attr_destroy before returning from start_upcall_thread Assisted-by: Claude:claude-sonnet-4-5 Signed-off-by: Thiago Becker Signed-off-by: Steve Dickson commit b461436233941cc40e23d954bd4d570f78cdeaf0 Author: Thiago Becker Date: Sat Jul 11 06:13:27 2026 -0400 rpc.gssd: Decrement client referece count on error paths Assisted-by: Claude:claude-sonnet-4-5 Signed-off-by: Thiago Becker Signed-off-by: Steve Dickson commit 50db36c7463188d65e553c195ee0774629713c64 Author: Jeff Layton Date: Sat Jul 11 06:08:05 2026 -0400 nfsstat: display NFSv4 callback operation statistics The kernel now maintains per-operation call counts for the NFSv4 backchannel (callback) operations it sends to clients, and exports them through the server-stats netlink dump as a new proc4cb-ops nested attribute (one server-proc-entry per callback opcode, OP_CB_GETATTR through OP_CB_OFFLOAD). Add a "Server nfs v4 callback operations" section to nfsstat that reports these counts. The data is only available over netlink -- the /proc interface exposes nothing equivalent (only the single wdeleg_getattr line, which corresponds to CB_GETATTR) -- so the section is displayed solely when the stats were fetched via netlink. This is detected by srvproc4cbinfo[0] being non-zero, which the netlink handler sets from the entry count and the /proc parsers never touch. The counters are indexed directly by RFC 8881 callback opcode, so the name array carries placeholders for the unassigned opcodes 0-2 to keep the array index aligned with the opcode value, mirroring the kernel's cb_counter layout. Signed-off-by: Jeff Layton Signed-off-by: Steve Dickson --- After the most recent review, we decided to add server side callback counts as a new feature for nfsstat. See the kernel patches here: https://lore.kernel.org/linux-nfs/20260618-exportd-netlink-v5-0-e9aef947af3d@kernel.org/ commit e4342316f4c93e88cce1382560c36dafbf4df58e Author: Scott Mayhew Date: Tue Jun 16 06:57:20 2026 -0400 nfsd: don't assume service is running when setting thread count to 0 Newer kernels return -EIO if you try to write to /proc/fs/nfsd/threads and there are no active listeners. Signed-off-by: Scott Mayhew Signed-off-by: Steve Dickson commit 1a6dcd74b57c0296e1e6c1e85a1a83edeeb59086 Author: Steve Dickson Date: Thu May 28 15:13:36 2026 -0400 Removed warnings in nfs_sockaddr2universal() in function 'nfs_sockaddr2universal', inlined from 'nsm_xmit_getaddr.constprop' at ../../support/nsm/rpc.c:251:17: ../../support/nfs/getport.c:459:24: warning: 'strndup' specified bound 108 exceeds source size 26 [-Wstringop-overread] 459 | return strndup(sun->sun_path, sizeof(sun->sun_path)); | ^ Signed-off-by: Steve Dickson commit e1401387fc83050cfcea9408d6c4eea006c8f811 Author: Jeff Layton Date: Thu May 28 13:05:15 2026 -0400 nfsstat: add netlink support for fetching server statistics Add Generic Netlink support to nfsstat for retrieving NFS server statistics, with automatic fallback to the existing /proc/net/rpc/nfsd parsing when netlink is unavailable (e.g., older kernels). The new code sends NFSD_CMD_SERVER_STATS_GET as a dump command and parses the reply to populate the same stat arrays used by the proc path: reply cache (rc), filehandle (fh), IO, network, RPC, and per-version procedure call counts (proc2/3/4/proc4ops). Signed-off-by: Jeff Layton Signed-off-by: Steve Dickson commit c67653543e48f33e5e41603719d43f239a97f412 Author: xuchenchen Date: Thu May 28 11:11:28 2026 -0400 libnfsidmap: avoid malloc(0) for empty Local-Realms conf_get_list() can return an empty list when Local-Realms is present but contains only empty fields, such as ", ,". In that case the Realms list logging path computes a buffer size of zero and then writes a NUL byte to the result of malloc(0). Reserve space for the terminating NUL byte and use calloc() so the log buffer is valid even when the realm list is empty. Signed-off-by: xuchenchen Signed-off-by: Steve Dickson commit 5b053c41bdad672236ffc713b9f658c35dcf7cc4 Author: Jeff Layton Date: Thu May 28 11:02:20 2026 -0400 support: mark unused arguments in netlink handlers with UNUSED() Use the project's UNUSED() macro from nfslib.h to suppress -Wunused-parameter warnings on the error_handler, finish_handler, and ack_handler callback parameters that are required by the libnl callback signatures but not referenced in the function bodies. Fixes: 3ddc8e81240f ("exportfs: release NFSv4 state when last client is unexported") Signed-off-by: Jeff Layton Signed-off-by: Steve Dickson commit a806c9d65662ecf5d40c00d60a514e13ada8d76e Author: Jeff Layton Date: Fri May 15 08:14:49 2026 -0400 exportfs: drop unused is_export parameter from xtab_read() and xtab_write() The is_export parameter is always passed as 1. Remove it and simplify both functions by eliminating the dead is_export == 0 code paths. Signed-off-by: Jeff Layton Signed-off-by: Steve Dickson commit 4cc2415ee83f479d19f7f10e7de5a0778bdc1e1c Author: Giulio Benetti Date: Fri May 15 08:10:53 2026 -0400 support/backend_sqlite.c: fix getrandom() fallback In old Linux/Glibc versions __NR_getrandom is defined in so let's add it to fix build failure. Signed-off-by: Giulio Benetti Signed-off-by: Steve Dickson commit 0a1ce87976523686fce7c82fee83edde2a9b3c53 Author: Giulio Benetti Date: Fri May 15 08:08:46 2026 -0400 Introduce compat.h file to deal with old Linux api and fix build failure due to missing NETLINK_EXT_ACK In "compat.h" check if NETLINK_EXT_ACK exists, otherwise define it to fix build failure and where at the moment is included let's include "compat.h" Signed-off-by: Giulio Benetti Signed-off-by: Steve Dickson commit 0097ceb136a7db15c535a78fca01e2814e82d2a7 Author: Giulio Benetti Date: Fri May 15 08:05:10 2026 -0400 fh_key_file: fix missing string.h inclusion Add #include to fix build failure. Signed-off-by: Giulio Benetti Signed-off-by: Steve Dickson commit cbbf618b31b64198de06a350c4f5744c76e51ecb Author: Tigran Mkrtchyan Date: Wed May 6 14:45:45 2026 -0400 nfs-iostat: add option to display throughput in MB/s Nowadays,the network bandwidth in kB/s is quite a large number to read. Thus, let nfsiostat display it in MB/s if requested. Signed-off-by: Tigran Mkrtchyan Signed-off-by: Steve Dickson commit 3ddc8e81240fcccf42b89c3dd35e9db42baf6344 Author: Chuck Lever Date: Sun Apr 12 10:46:15 2026 -0400 exportfs: release NFSv4 state when last client is unexported When exportfs -u removes the last client for a given export path, NFSv4 state (opens, locks, delegations) acquired through that export may still hold the underlying filesystem busy, preventing unmount. After removing an export entry, check whether any active exports remain for the same path across all client types. If none remain, send NFSD_CMD_UNLOCK_EXPORT to the kernel via generic netlink, which revokes the associated NFSv4 state and closes cached file handles. This uses a new shared helper, nfsd_nl_cmd_str(), in support/nfs/nfsdnl.c that handles the netlink socket setup, message construction, and ACK handling for simple nfsd commands carrying a single string attribute. The helper is conditionally compiled when libnl3 is available (gated by the existing nfsdctl configure option). Also update the local nfsd_netlink.h copy with the NFSD_CMD_UNLOCK_IP, NFSD_CMD_UNLOCK_FILESYSTEM, and NFSD_CMD_UNLOCK_EXPORT command and attribute definitions. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever Signed-off-by: Steve Dickson