]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
NFSv4.1: Apply session size limits on clone path
authorTushar Sariya <tushar.97@hotmail.com>
Sat, 4 Apr 2026 14:28:03 +0000 (11:58 -0230)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Mon, 13 Apr 2026 21:56:09 +0000 (14:56 -0700)
commit8c787b286f39c7584440b97b92f87cbe934c13ff
treec5e4ae8f72ba9f44c370f0d19cee178f61a5829c
parent515af10044f1c0d6f4356fcfb313465f02f484e9
NFSv4.1: Apply session size limits on clone path

nfs4_clone_server() builds a child nfs_server for same-server
automounted submounts but never calls nfs4_session_limit_rwsize()
or nfs4_session_limit_xasize() after nfs_clone_server(). This means
the child mount can end up with rsize/wsize values that exceed the
negotiated session channel limits, causing NFS4ERR_REQ_TOO_BIG and
EIO on servers that enforce tight max_request_size budgets.

Top-level mounts go through nfs4_server_common_setup() which calls
these limiters after nfs_probe_server(). Apply the same clamping on
the clone path for consistency.

Fixes: 2b092175f5e3 ("NFS: Fix inheritance of the block sizes when automounting")
Cc: stable@vger.kernel.org
Signed-off-by: Tushar Sariya <tushar.97@hotmail.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
fs/nfs/internal.h
fs/nfs/nfs4client.c
fs/nfs/nfs4proc.c