Skip to content

Commit eff7936

Browse files
trondmypdJ. Bruce Fields
authored andcommitted
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: Dave Jones <[email protected]> Fixes: 1c5876d ("sunrpc: move p_count out of struct rpc_procinfo") Signed-off-by: Trond Myklebust <[email protected]> Reported-by: Dave Jones <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
1 parent 5771a8c commit eff7936

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

fs/nfsd/nfs4callback.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -720,8 +720,8 @@ static const struct rpc_version nfs_cb_version4 = {
720720
.counts = nfs4_cb_counts,
721721
};
722722

723-
static const struct rpc_version *nfs_cb_version[] = {
724-
&nfs_cb_version4,
723+
static const struct rpc_version *nfs_cb_version[2] = {
724+
[1] = &nfs_cb_version4,
725725
};
726726

727727
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
795795
.saddress = (struct sockaddr *) &conn->cb_saddr,
796796
.timeout = &timeparms,
797797
.program = &cb_program,
798-
.version = 0,
798+
.version = 1,
799799
.flags = (RPC_CLNT_CREATE_NOPING | RPC_CLNT_CREATE_QUIET),
800800
};
801801
struct rpc_clnt *client;

0 commit comments

Comments
 (0)