diff options
author | Christoph Hellwig <hch@lst.de> | 2017-05-12 17:11:49 +0300 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2017-05-15 18:42:31 +0300 |
commit | 860bda29b99afdc072a7a796fe81185f7ae85deb (patch) | |
tree | 801d2c90df6046bfec0b3be678d84acc2b5637e8 /fs/nfsd/nfssvc.c | |
parent | 7fd38af9cae6aef1dfd28a7d1bd214eb5ddb7d53 (diff) | |
download | linux-860bda29b99afdc072a7a796fe81185f7ae85deb.tar.xz |
sunrpc: mark all struct svc_procinfo instances as const
struct svc_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>
Diffstat (limited to 'fs/nfsd/nfssvc.c')
-rw-r--r-- | fs/nfsd/nfssvc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c index 555233664124..379b310c445d 100644 --- a/fs/nfsd/nfssvc.c +++ b/fs/nfsd/nfssvc.c @@ -756,7 +756,7 @@ static __be32 map_new_errors(u32 vers, __be32 nfserr) * problem, we enforce these assumptions here: */ static bool nfs_request_too_big(struct svc_rqst *rqstp, - struct svc_procedure *proc) + const struct svc_procedure *proc) { /* * The ACL code has more careful bounds-checking and is not @@ -781,7 +781,7 @@ static bool nfs_request_too_big(struct svc_rqst *rqstp, int nfsd_dispatch(struct svc_rqst *rqstp, __be32 *statp) { - struct svc_procedure *proc; + const struct svc_procedure *proc; __be32 nfserr; __be32 *nfserrp; |