diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2024-09-19 13:09:19 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2024-09-19 13:09:19 +0200 |
commit | 509d2cd12a10d057fdf72f565b930f9a81140d59 (patch) | |
tree | 67236041fd6b6d6d1a557a22a5af8d78f26d0522 /security | |
parent | 7f52bb9de57dc1851a83e20e53491ad8df321e4e (diff) | |
parent | 2749749afa071f8a0e405605de9da615e771a7ce (diff) |
Merge tag 'Smack-for-6.12' of https://github.com/cschaufler/smack-next
Pull smack updates from Casey Schaufler:
"Two patches: one is a simple indentation correction, the other
corrects a potentially rcu unsafe pointer assignment"
* tag 'Smack-for-6.12' of https://github.com/cschaufler/smack-next:
smackfs: Use rcu_assign_pointer() to ensure safe assignment in smk_set_cipso
security: smack: Fix indentation in smack_netfilter.c
Diffstat (limited to 'security')
-rw-r--r-- | security/smack/smack_netfilter.c | 4 | ||||
-rw-r--r-- | security/smack/smackfs.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/security/smack/smack_netfilter.c b/security/smack/smack_netfilter.c index bad71b7e648d..8fd747b3653a 100644 --- a/security/smack/smack_netfilter.c +++ b/security/smack/smack_netfilter.c @@ -19,8 +19,8 @@ #include "smack.h" static unsigned int smack_ip_output(void *priv, - struct sk_buff *skb, - const struct nf_hook_state *state) + struct sk_buff *skb, + const struct nf_hook_state *state) { struct sock *sk = skb_to_full_sk(skb); struct socket_smack *ssp; diff --git a/security/smack/smackfs.c b/security/smack/smackfs.c index e22aad7604e8..5dd1e164f9b1 100644 --- a/security/smack/smackfs.c +++ b/security/smack/smackfs.c @@ -932,7 +932,7 @@ static ssize_t smk_set_cipso(struct file *file, const char __user *buf, } if (rc >= 0) { old_cat = skp->smk_netlabel.attr.mls.cat; - skp->smk_netlabel.attr.mls.cat = ncats.attr.mls.cat; + rcu_assign_pointer(skp->smk_netlabel.attr.mls.cat, ncats.attr.mls.cat); skp->smk_netlabel.attr.mls.lvl = ncats.attr.mls.lvl; synchronize_rcu(); netlbl_catmap_free(old_cat); |