mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
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 <[email protected]> Acked-by: Trond Myklebust <[email protected]>
This commit is contained in:
parent
f700c72dd2
commit
499b498810
16 changed files with 31 additions and 30 deletions
|
|
@ -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),
|
||||
|
|
|
|||
|
|
@ -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),
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue