mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-27 11:06:41 -05:00
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
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user