diff options
author | Christoph Hellwig <hch@lst.de> | 2017-05-12 16:11:49 +0200 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2017-05-15 17:42:31 +0200 |
commit | 860bda29b99afdc072a7a796fe81185f7ae85deb (patch) | |
tree | 801d2c90df6046bfec0b3be678d84acc2b5637e8 /fs/nfsd/nfs3proc.c | |
parent | 7fd38af9cae6aef1dfd28a7d1bd214eb5ddb7d53 (diff) | |
download | linux-next-860bda29b99afdc072a7a796fe81185f7ae85deb.tar.gz |
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/nfs3proc.c')
-rw-r--r-- | fs/nfsd/nfs3proc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfsd/nfs3proc.c b/fs/nfsd/nfs3proc.c index b5823802e278..96e0e6a2af51 100644 --- a/fs/nfsd/nfs3proc.c +++ b/fs/nfsd/nfs3proc.c @@ -674,7 +674,7 @@ struct nfsd3_voidargs { int dummy; }; #define pAT (1+AT) /* post attributes - conditional */ #define WC (7+pAT) /* WCC attributes */ -static struct svc_procedure nfsd_procedures3[22] = { +static const struct svc_procedure nfsd_procedures3[22] = { [NFS3PROC_NULL] = { .pc_func = nfsd3_proc_null, .pc_encode = nfs3svc_encode_voidres, |