From: WANG Cong Date: Tue, 29 Nov 2016 17:14:56 +0000 (-0800) Subject: audit: remove useless synchronize_net() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=60602982720f3a77366ee3e493a6e3d15e7e84f5;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 = {