summaryrefslogtreecommitdiffstats
path: root/kernel/audit.c
diff options
context:
space:
mode:
authorWANG Cong <xiyou.wangcong@gmail.com>2016-11-29 09:14:56 -0800
committerDavid S. Miller <davem@davemloft.net>2016-12-01 11:29:02 -0500
commit60602982720f3a77366ee3e493a6e3d15e7e84f5 (patch)
treebb3103c6262c7627550d05124974f8a6f11602ed /kernel/audit.c
parent88578468196f72d13672b86b6236f9c6fb035869 (diff)
downloadop-kernel-dev-60602982720f3a77366ee3e493a6e3d15e7e84f5.zip
op-kernel-dev-60602982720f3a77366ee3e493a6e3d15e7e84f5.tar.gz
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 92c463d..67b9fbd8 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 = {
OpenPOWER on IntegriCloud