summaryrefslogtreecommitdiff
path: root/fs/nfs/internal.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2017-05-12 15:36:49 +0200
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2017-07-13 15:57:57 -0400
commit511e936bf2b3e8be2a3160ace3d86be07962a7a8 (patch)
treeb9eabbc23dbaa937917d01f8f8dc5d8a60124b95 /fs/nfs/internal.h
parent9ae7d8ff2948c4514b9a6bfef7f1a548ea6ab190 (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/internal.h')
-rw-r--r--fs/nfs/internal.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h
index 3e24392f2caa..dc2a29a7d48b 100644
--- a/fs/nfs/internal.h
+++ b/fs/nfs/internal.h
@@ -270,12 +270,12 @@ static inline bool nfs_match_open_context(const struct nfs_open_context *ctx1,
}
/* nfs2xdr.c */
-extern struct rpc_procinfo nfs_procedures[];
+extern const struct rpc_procinfo nfs_procedures[];
extern int nfs2_decode_dirent(struct xdr_stream *,
struct nfs_entry *, int);
/* nfs3xdr.c */
-extern struct rpc_procinfo nfs3_procedures[];
+extern const struct rpc_procinfo nfs3_procedures[];
extern int nfs3_decode_dirent(struct xdr_stream *,
struct nfs_entry *, int);
@@ -292,7 +292,7 @@ extern const u32 nfs41_maxgetdevinfo_overhead;
/* nfs4proc.c */
#if IS_ENABLED(CONFIG_NFS_V4)
-extern struct rpc_procinfo nfs4_procedures[];
+extern const struct rpc_procinfo nfs4_procedures[];
#endif
#ifdef CONFIG_NFS_V4_SECURITY_LABEL