diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2017-08-01 11:59:49 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2017-08-24 22:13:50 -0400 |
commit | 2412e927604e0af7e17ae4b688b85a1e87e378fe (patch) | |
tree | fd19b288f4a379c1fab36d99c867d4ef37da6c36 /include/linux/sunrpc | |
parent | bac966d6065207b6900a4c2a3e6e5f78cfee7b4d (diff) |
sunrpc: Const-ify instances of struct svc_xprt_ops
Close an attack vector by moving the arrays of server-side transport
methods to read-only memory.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'include/linux/sunrpc')
-rw-r--r-- | include/linux/sunrpc/svc_xprt.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/sunrpc/svc_xprt.h b/include/linux/sunrpc/svc_xprt.h index ddb7f94a9d06..6a2ad38f5458 100644 --- a/include/linux/sunrpc/svc_xprt.h +++ b/include/linux/sunrpc/svc_xprt.h @@ -31,7 +31,7 @@ struct svc_xprt_ops { struct svc_xprt_class { const char *xcl_name; struct module *xcl_owner; - struct svc_xprt_ops *xcl_ops; + const struct svc_xprt_ops *xcl_ops; struct list_head xcl_list; u32 xcl_max_payload; int xcl_ident; @@ -49,7 +49,7 @@ struct svc_xpt_user { struct svc_xprt { struct svc_xprt_class *xpt_class; - struct svc_xprt_ops *xpt_ops; + const struct svc_xprt_ops *xpt_ops; struct kref xpt_ref; struct list_head xpt_list; struct list_head xpt_ready; |