diff options
author | Christoph Hellwig <hch@lst.de> | 2017-05-12 16:36:49 +0300 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2017-05-15 18:42:20 +0300 |
commit | 499b4988109e91b76f231fb1b4f1e53ec3260686 (patch) | |
tree | cb00c04bb34f8e82ef15bdd4d843c33a7833c80e /fs/nfs/internal.h | |
parent | f700c72dd2f1f886f56788436b540aab95903c3f (diff) | |
download | linux-499b4988109e91b76f231fb1b4f1e53ec3260686.tar.xz |
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.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h index e9b4c3320e37..c21254924389 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 |