From: WANG Cong Date: Tue, 29 Nov 2016 17:14:56 +0000 (-0800) Subject: audit: remove useless synchronize_net() X-Git-Tag: v4.10-rc1~202^2~136 X-Git-Url: https://git.kernelconcepts.de/?p=karo-tx-linux.git;a=commitdiff_plain;h=60602982720f3a77366ee3e493a6e3d15e7e84f5 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 Signed-off-by: Cong Wang Signed-off-by: David S. Miller --- 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 = {