summaryrefslogtreecommitdiff
path: root/include/linux/sunrpc
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2017-08-01 19:00:39 +0300
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2017-08-01 23:10:35 +0300
commitd31ae2548142b7cd12404929ef3a13ae27c9d961 (patch)
tree96ec2d4daa55198d6181dc21eb77d484e82024c2 /include/linux/sunrpc
parent16f73eb02d7e1765ccab3d2018e0bd98eb93d973 (diff)
downloadlinux-d31ae2548142b7cd12404929ef3a13ae27c9d961.tar.xz
sunrpc: Const-ify all instances of struct rpc_xprt_ops
After transport instance creation, these function pointers never change. Mark them as constant to prevent their use as an attack vector for code injections. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'include/linux/sunrpc')
-rw-r--r--include/linux/sunrpc/xprt.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h
index eab1c749e192..f60c55ca2e2e 100644
--- a/include/linux/sunrpc/xprt.h
+++ b/include/linux/sunrpc/xprt.h
@@ -174,7 +174,7 @@ enum xprt_transports {
struct rpc_xprt {
struct kref kref; /* Reference count */
- struct rpc_xprt_ops * ops; /* transport methods */
+ const struct rpc_xprt_ops *ops; /* transport methods */
const struct rpc_timeout *timeout; /* timeout parms */
struct sockaddr_storage addr; /* server address */