summaryrefslogtreecommitdiffstats
path: root/fs/nfs/internal.h
diff options
context:
space:
mode:
authorChristoph Hellwig2017-05-12 15:36:49 +0200
committerAnna Schumaker2017-07-13 21:57:57 +0200
commit511e936bf2b3e8be2a3160ace3d86be07962a7a8 (patch)
treeb9eabbc23dbaa937917d01f8f8dc5d8a60124b95 /fs/nfs/internal.h
parentnfs: use ARRAY_SIZE() in the nfsacl_version3 declaration (diff)
downloadkernel-qcow2-linux-511e936bf2b3e8be2a3160ace3d86be07962a7a8.tar.gz
kernel-qcow2-linux-511e936bf2b3e8be2a3160ace3d86be07962a7a8.tar.xz
kernel-qcow2-linux-511e936bf2b3e8be2a3160ace3d86be07962a7a8.zip
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