Przeglądaj źródła

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>
WANG Cong 8 lat temu
rodzic
commit
6060298272
1 zmienionych plików z 1 dodań i 2 usunięć
  1. 1 2
      kernel/audit.c

+ 1 - 2
kernel/audit.c

@@ -1172,9 +1172,8 @@ static void __net_exit audit_net_exit(struct net *net)
 		audit_sock = NULL;
 		audit_sock = NULL;
 	}
 	}
 
 
-	RCU_INIT_POINTER(aunet->nlsk, NULL);
-	synchronize_net();
 	netlink_kernel_release(sock);
 	netlink_kernel_release(sock);
+	aunet->nlsk = NULL;
 }
 }
 
 
 static struct pernet_operations audit_net_ops __net_initdata = {
 static struct pernet_operations audit_net_ops __net_initdata = {