diff options
author | Christoph Hellwig <hch@lst.de> | 2017-05-12 15:36:49 +0200 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2017-05-15 17:42:20 +0200 |
commit | 499b4988109e91b76f231fb1b4f1e53ec3260686 (patch) | |
tree | cb00c04bb34f8e82ef15bdd4d843c33a7833c80e /fs/lockd | |
parent | f700c72dd2f1f886f56788436b540aab95903c3f (diff) | |
download | op-kernel-dev-499b4988109e91b76f231fb1b4f1e53ec3260686.zip op-kernel-dev-499b4988109e91b76f231fb1b4f1e53ec3260686.tar.gz |
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/lockd')
-rw-r--r-- | fs/lockd/clnt4xdr.c | 2 | ||||
-rw-r--r-- | fs/lockd/clntxdr.c | 2 | ||||
-rw-r--r-- | fs/lockd/mon.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/fs/lockd/clnt4xdr.c b/fs/lockd/clnt4xdr.c index 7c255d1..c349fc0 100644 --- a/fs/lockd/clnt4xdr.c +++ b/fs/lockd/clnt4xdr.c @@ -584,7 +584,7 @@ out: .p_name = #proc, \ } -static struct rpc_procinfo nlm4_procedures[] = { +static const struct rpc_procinfo nlm4_procedures[] = { PROC(TEST, testargs, testres), PROC(LOCK, lockargs, res), PROC(CANCEL, cancargs, res), diff --git a/fs/lockd/clntxdr.c b/fs/lockd/clntxdr.c index 39500c5..3b4724a 100644 --- a/fs/lockd/clntxdr.c +++ b/fs/lockd/clntxdr.c @@ -582,7 +582,7 @@ out: .p_name = #proc, \ } -static struct rpc_procinfo nlm_procedures[] = { +static const struct rpc_procinfo nlm_procedures[] = { PROC(TEST, testargs, testres), PROC(LOCK, lockargs, res), PROC(CANCEL, cancargs, res), diff --git a/fs/lockd/mon.c b/fs/lockd/mon.c index fe4ec82..9d8166c 100644 --- a/fs/lockd/mon.c +++ b/fs/lockd/mon.c @@ -531,7 +531,7 @@ static int nsm_xdr_dec_stat(struct rpc_rqst *rqstp, #define SM_monres_sz 2 #define SM_unmonres_sz 1 -static struct rpc_procinfo nsm_procedures[] = { +static const struct rpc_procinfo nsm_procedures[] = { [NSMPROC_MON] = { .p_proc = NSMPROC_MON, .p_encode = nsm_xdr_enc_mon, |