summaryrefslogtreecommitdiff
path: root/fs/nfs/mount_clnt.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2017-05-12 15:36:49 +0200
committerChristoph Hellwig <hch@lst.de>2017-05-15 17:42:20 +0200
commit499b4988109e91b76f231fb1b4f1e53ec3260686 (patch)
treecb00c04bb34f8e82ef15bdd4d843c33a7833c80e /fs/nfs/mount_clnt.c
parentf700c72dd2f1f886f56788436b540aab95903c3f (diff)
sunrpc: mark all struct rpc_procinfo instances as const
struct rpc_procinfo contains function pointers, and marking it as constant avoids it being able to be used as an attach vector for code injections. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs/mount_clnt.c')
-rw-r--r--fs/nfs/mount_clnt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/nfs/mount_clnt.c b/fs/nfs/mount_clnt.c
index d25914aa8bf9..3efe946672be 100644
--- a/fs/nfs/mount_clnt.c
+++ b/fs/nfs/mount_clnt.c
@@ -466,7 +466,7 @@ static int mnt_xdr_dec_mountres3(struct rpc_rqst *req,
return decode_auth_flavors(xdr, res);
}
-static struct rpc_procinfo mnt_procedures[] = {
+static const struct rpc_procinfo mnt_procedures[] = {
[MOUNTPROC_MNT] = {
.p_proc = MOUNTPROC_MNT,
.p_encode = mnt_xdr_enc_dirpath,
@@ -485,7 +485,7 @@ static struct rpc_procinfo mnt_procedures[] = {
},
};
-static struct rpc_procinfo mnt3_procedures[] = {
+static const struct rpc_procinfo mnt3_procedures[] = {
[MOUNTPROC3_MNT] = {
.p_proc = MOUNTPROC3_MNT,
.p_encode = mnt_xdr_enc_dirpath,