summaryrefslogtreecommitdiff
path: root/fs/nfsd/nfsproc.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2017-05-12 17:11:49 +0300
committerChristoph Hellwig <hch@lst.de>2017-05-15 18:42:31 +0300
commit860bda29b99afdc072a7a796fe81185f7ae85deb (patch)
tree801d2c90df6046bfec0b3be678d84acc2b5637e8 /fs/nfsd/nfsproc.c
parent7fd38af9cae6aef1dfd28a7d1bd214eb5ddb7d53 (diff)
downloadlinux-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/nfsproc.c')
-rw-r--r--fs/nfsd/nfsproc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfsd/nfsproc.c b/fs/nfsd/nfsproc.c
index 44b157553733..a68b686fda12 100644
--- a/fs/nfsd/nfsproc.c
+++ b/fs/nfsd/nfsproc.c
@@ -573,7 +573,7 @@ struct nfsd_void { int dummy; };
#define FH 8 /* filehandle */
#define AT 18 /* attributes */
-static struct svc_procedure nfsd_procedures2[18] = {
+static const struct svc_procedure nfsd_procedures2[18] = {
[NFSPROC_NULL] = {
.pc_func = nfsd_proc_null,
.pc_decode = nfssvc_decode_void,