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>
This commit is contained in:

committed by
Anna Schumaker

parent
16f73eb02d
commit
d31ae25481
@@ -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 */
|
||||
|
Reference in New Issue
Block a user