Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eff79368 authored by Trond Myklebust's avatar Trond Myklebust Committed by J. Bruce Fields
Browse files

nfsd: Fix a memory scribble in the callback channel



The offset of the entry in struct rpc_version has to match the version
number.

Reported-by: default avatarDave Jones <davej@codemonkey.org.uk>
Fixes: 1c5876dd ("sunrpc: move p_count out of struct rpc_procinfo")
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
Reported-by: default avatarDave Jones <davej@codemonkey.org.uk>
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
parent 5771a8c0
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -720,8 +720,8 @@ static const struct rpc_version nfs_cb_version4 = {
	.counts			= nfs4_cb_counts,
};

static const struct rpc_version *nfs_cb_version[] = {
	&nfs_cb_version4,
static const struct rpc_version *nfs_cb_version[2] = {
	[1] = &nfs_cb_version4,
};

static const struct rpc_program cb_program;
@@ -795,7 +795,7 @@ static int setup_callback_client(struct nfs4_client *clp, struct nfs4_cb_conn *c
		.saddress	= (struct sockaddr *) &conn->cb_saddr,
		.timeout	= &timeparms,
		.program	= &cb_program,
		.version	= 0,
		.version	= 1,
		.flags		= (RPC_CLNT_CREATE_NOPING | RPC_CLNT_CREATE_QUIET),
	};
	struct rpc_clnt *client;