summaryrefslogtreecommitdiff
path: root/include/linux/security.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2023-07-14 10:27:33 +0300
committerDavid S. Miller <davem@davemloft.net>2023-07-14 10:27:33 +0300
commitf63cfa103be9b16c4491f1d58bbef3616fc61a92 (patch)
tree17b02304475d9e7bc93574f2225a68d48523c134 /include/linux/security.h
parentdef3833fc6022c7f23bd4fd66ba5ed65c6b23272 (diff)
parentdc4c399d215d76689ebadec7ed3184bcf213e2ee (diff)
downloadlinux-f63cfa103be9b16c4491f1d58bbef3616fc61a92.tar.xz
Merge branch 'sk-const'
Guillaume Nault says: ==================== net: Mark the sk parameter of routing functions as 'const'. The sk_getsecid security hook prevents the use of a const sk pointer in several routing functions. Since this hook should only read sk data, make its sk argument const (patch 1), then constify the sk parameter of various routing functions (patches 2-4). Build-tested with make allmodconfig. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/security.h')
-rw-r--r--include/linux/security.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/security.h b/include/linux/security.h
index 32828502f09e..994cf099d9ac 100644
--- a/include/linux/security.h
+++ b/include/linux/security.h
@@ -1439,7 +1439,8 @@ int security_socket_getpeersec_dgram(struct socket *sock, struct sk_buff *skb, u
int security_sk_alloc(struct sock *sk, int family, gfp_t priority);
void security_sk_free(struct sock *sk);
void security_sk_clone(const struct sock *sk, struct sock *newsk);
-void security_sk_classify_flow(struct sock *sk, struct flowi_common *flic);
+void security_sk_classify_flow(const struct sock *sk,
+ struct flowi_common *flic);
void security_req_classify_flow(const struct request_sock *req,
struct flowi_common *flic);
void security_sock_graft(struct sock*sk, struct socket *parent);
@@ -1597,7 +1598,7 @@ static inline void security_sk_clone(const struct sock *sk, struct sock *newsk)
{
}
-static inline void security_sk_classify_flow(struct sock *sk,
+static inline void security_sk_classify_flow(const struct sock *sk,
struct flowi_common *flic)
{
}