FAILED: patch "[PATCH] NFSv4.1: Apply session size limits on clone path" failed to apply to 6.1-stable tree
Subsystems (2)
[email protected]
maintainerThe patch below does not apply to the 6.1-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.1.y
git checkout FETCH_HEAD
git cherry-pick -x 8c787b286f39c7584440b97b92f87cbe934c13ff
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026050422-flying-agent-ed43@gregkh' --subject-prefix 'PATCH 6.1.y' HEAD^..
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 8c787b286f39c7584440b97b92f87cbe934c13ff Mon Sep 17 00:00:00 2001
From: Tushar Sariya <[email protected]>
Date: Sat, 4 Apr 2026 11:58:03 -0230
Subject: [PATCH] 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.
fs/nfs/internal.h +2 -0
@@ -253,6 +253,8 @@ extern struct nfs_client *nfs4_set_ds_client(struct nfs_server *mds_srv, u32 minor_version);extern struct rpc_clnt *nfs4_find_or_create_ds_client (struct nfs_client *,struct inode *); +extern void nfs4_session_limit_rwsize (struct nfs_server *server); +extern void nfs4_session_limit_xasize (struct nfs_server *server); extern struct nfs_client *nfs3_set_ds_client(struct nfs_server *mds_srv, const struct sockaddr_storage *ds_addr, int ds_addrlen, int ds_proto, unsigned int ds_timeo,
fs/nfs/nfs4client.c +2 -2
@@ -855,7 +855,7 @@ EXPORT_SYMBOL_GPL(nfs4_set_ds_client);* Limit the mount rsize, wsize and dtsize using negotiated fore * channel attributes. */ -static void nfs4_session_limit_rwsize (struct nfs_server *server) +void nfs4_session_limit_rwsize (struct nfs_server *server) {struct nfs4_session *sess;u32 server_resp_sz;
@@ -878,7 +878,7 @@ static void nfs4_session_limit_rwsize(struct nfs_server *server)/* * Limit xattr sizes using the channel attributes. */ -static void nfs4_session_limit_xasize (struct nfs_server *server) +void nfs4_session_limit_xasize (struct nfs_server *server) {#ifdef CONFIG_NFS_V4_2 struct nfs4_session *sess;
fs/nfs/nfs4proc.c +3 -0
@@ -10637,6 +10637,9 @@ static struct nfs_server *nfs4_clone_server(struct nfs_server *source,if (IS_ERR (server))return server; +nfs4_session_limit_rwsize (server); +nfs4_session_limit_xasize (server); + error =nfs4_delegation_hash_alloc (server);if (error) {nfs_free_server (server);