summaryrefslogtreecommitdiffstats
path: root/kernel/audit.c
diff options
context:
space:
mode:
authorWANG Cong <xiyou.wangcong@gmail.com>2016-11-29 18:14:56 +0100
committerDavid S. Miller <davem@davemloft.net>2016-12-01 17:29:02 +0100
commit60602982720f3a77366ee3e493a6e3d15e7e84f5 (patch)
treebb3103c6262c7627550d05124974f8a6f11602ed /kernel/audit.c
parentMerge branch 'mdix_ctrl' (diff)
downloadlinux-60602982720f3a77366ee3e493a6e3d15e7e84f5.tar.xz
linux-60602982720f3a77366ee3e493a6e3d15e7e84f5.zip
audit: remove useless synchronize_net()
netlink kernel socket is protected by refcount, not RCU. Its rcv path is neither protected by RCU. So the synchronize_net() is just pointless. Cc: Richard Guy Briggs <rgb@redhat.com> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'kernel/audit.c')
-rw-r--r--kernel/audit.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/audit.c b/kernel/audit.c
index 92c463d2d1c7..67b9fbd871be 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
@@ -1172,9 +1172,8 @@ static void __net_exit audit_net_exit(struct net *net)
audit_sock = NULL;
}
- RCU_INIT_POINTER(aunet->nlsk, NULL);
- synchronize_net();
netlink_kernel_release(sock);
+ aunet->nlsk = NULL;
}
static struct pernet_operations audit_net_ops __net_initdata = {