nfs: reject version and minorversion changes on remount attempts
Subsystems (2)
PATCH 1/1 nfs: reject version and minorversion changes on remount attempts
Reported-by Eric Doutreleau <[email protected]>
Signed-off-by Jeff Layton <[email protected]>
--- fs/nfs/super.c | 4 ++++ 1 file changed, 4 insertions(+)
fs/nfs/super.c +4 -0
@@ -2143,6 +2143,8 @@ nfs_compare_remount_data(struct nfs_server *nfss, if (data->flags != nfss->flags || data->rsize != nfss->rsize || data->wsize != nfss->wsize || + data->version != nfss->nfs_client->rpc_ops->version || + data->minorversion != nfss->nfs_client->cl_minorversion || data->retrans != nfss->client->cl_timeout->to_retries || data->auth_flavors[0] != nfss->client->cl_auth->au_flavor || data->acregmin != nfss->acregmin / HZ ||
@@ -2197,6 +2199,8 @@ nfs_remount(struct super_block *sb, int *flags, char *raw_data) data->timeo =10U * nfss->client->cl_timeout->to_initval /HZ ; data->nfs_server.port = nfss->port; data->nfs_server.addrlen = nfss->nfs_client->cl_addrlen; + data->version = nfsvers; + data->minorversion = nfss->nfs_client->cl_minorversion;memcpy (&data->nfs_server.address, &nfss->nfs_client->cl_addr, data->nfs_server.addrlen);
Signature · 1 line
1.8.3.1
Quoted 20 lines · On Mon, 21 Oct 2013 09:51:45 -0400 Jeff Layton <[email protected]> wrote:
Reported-by Eric Doutreleau <[email protected]>Signed-off-by Jeff Layton <[email protected]>--- fs/nfs/super.c | 4 ++++ 1 file changed, 4 insertions(+)fs/nfs/super.c +2
-0@@ -2143,6 +2143,8 @@ nfs_compare_remount_data(struct nfs_server *nfss, if (data->flags != nfss->flags || data->rsize != nfss->rsize || data->wsize != nfss->wsize || + data->version != nfss->nfs_client->rpc_ops->version || + data->minorversion != nfss->nfs_client->cl_minorversion || data->retrans != nfss->client->cl_timeout->to_retries || data->auth_flavors[0] != nfss->client->cl_auth->au_flavor || data->acregmin != nfss->acregmin / HZ ||
fs/nfs/super.c nfs_remount(struct super_block *sb, int *flags, char *raw_data) · line 2206
Quoted 8 lines
fs/nfs/super.c +2
-0@@ -2197,6 +2199,8 @@ nfs_remount(struct super_block *sb, int *flags, char *raw_data) data->timeo =10U * nfss->client->cl_timeout->to_initval /HZ ; data->nfs_server.port = nfss->port; data->nfs_server.addrlen = nfss->nfs_client->cl_addrlen; + data->version = nfsvers; + data->minorversion = nfss->nfs_client->cl_minorversion;memcpy (&data->nfs_server.address, &nfss->nfs_client->cl_addr, data->nfs_server.addrlen);
Sorry for the resend here. There is no difference between this patch and the one I sent last week, other than the addition of the Reported-by tag.
Cheers,
Signature · 1 line
Jeff Layton <[email protected]>