sunrpc: Const-ify struct sv_serv_ops

Close an attack vector by moving the arrays of per-server methods to
read-only memory.

Signed-off-by: Chuck Lever <[email protected]>
Signed-off-by: J. Bruce Fields <[email protected]>
This commit is contained in:
Chuck Lever 2017-08-01 12:00:06 -04:00 • committed by J. Bruce Fields
commit afea5657c2
5 changed files with 13 additions and 13 deletions

View file

@ -396,7 +396,7 @@ out_rqst:
return error;
}
static struct svc_serv_ops lockd_sv_ops = {
static const struct svc_serv_ops lockd_sv_ops = {
.svo_shutdown = svc_rpcb_cleanup,
.svo_enqueue_xprt = svc_xprt_do_enqueue,
};