summaryrefslogtreecommitdiff
path: root/include/linux/sunrpc/clnt.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2017-05-12 15:36:49 +0200
committerChristoph Hellwig <hch@lst.de>2017-05-15 17:42:20 +0200
commit499b4988109e91b76f231fb1b4f1e53ec3260686 (patch)
treecb00c04bb34f8e82ef15bdd4d843c33a7833c80e /include/linux/sunrpc/clnt.h
parentf700c72dd2f1f886f56788436b540aab95903c3f (diff)
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 'include/linux/sunrpc/clnt.h')
-rw-r--r--include/linux/sunrpc/clnt.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h
index c75ba37151fe..55ef67bea06b 100644
--- a/include/linux/sunrpc/clnt.h
+++ b/include/linux/sunrpc/clnt.h
@@ -39,7 +39,7 @@ struct rpc_clnt {
struct list_head cl_tasks; /* List of tasks */
spinlock_t cl_lock; /* spinlock */
struct rpc_xprt __rcu * cl_xprt; /* transport */
- struct rpc_procinfo * cl_procinfo; /* procedure info */
+ const struct rpc_procinfo *cl_procinfo; /* procedure info */
u32 cl_prog, /* RPC program number */
cl_vers, /* RPC version number */
cl_maxproc; /* max procedure number */
@@ -87,7 +87,7 @@ struct rpc_program {
struct rpc_version {
u32 number; /* version number */
unsigned int nrprocs; /* number of procs */
- struct rpc_procinfo * procs; /* procedure array */
+ const struct rpc_procinfo *procs; /* procedure array */
unsigned int *counts; /* call counts */
};