summaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2023-03-17 16:55:35 +0100
committerDavid S. Miller <davem@davemloft.net>2023-03-18 13:23:33 +0100
commitb064ba9c3cfaf3d22d6153ec3c245eaa4d913674 (patch)
tree3f76755a82c18f25a1ad11a16f4baeb63c4a3053 /security
parentdccp: preserve const qualifier in dccp_sk() (diff)
downloadlinux-b064ba9c3cfaf3d22d6153ec3c245eaa4d913674.tar.xz
linux-b064ba9c3cfaf3d22d6153ec3c245eaa4d913674.zip
af_unix: preserve const qualifier in unix_sk()
We can change unix_sk() to propagate its argument const qualifier, thanks to container_of_const(). We need to change dump_common_audit_data() 'struct unix_sock *u' local var to get a const attribute. Signed-off-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Simon Horman <simon.horman@corigine.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'security')
-rw-r--r--security/lsm_audit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/lsm_audit.c b/security/lsm_audit.c
index 00d3bdd386e2..368e77ca43c4 100644
--- a/security/lsm_audit.c
+++ b/security/lsm_audit.c
@@ -310,7 +310,7 @@ static void dump_common_audit_data(struct audit_buffer *ab,
case LSM_AUDIT_DATA_NET:
if (a->u.net->sk) {
const struct sock *sk = a->u.net->sk;
- struct unix_sock *u;
+ const struct unix_sock *u;
struct unix_address *addr;
int len = 0;
char *p = NULL;