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>
This commit is contained in:
Christoph Hellwig
2017-05-12 15:36:49 +02:00
parent f700c72dd2
commit 499b498810
16 changed files with 31 additions and 30 deletions

View File

@@ -63,7 +63,7 @@ enum {
.p_name = #proc, \
}
static struct rpc_procinfo gssp_procedures[] = {
static const struct rpc_procinfo gssp_procedures[] = {
PROC(INDICATE_MECHS, indicate_mechs),
PROC(GET_CALL_CONTEXT, get_call_context),
PROC(IMPORT_AND_CANON_NAME, import_and_canon_name),