Skip to content

Commit

Permalink
audit: remove useless synchronize_net()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
WANG Cong authored and David S. Miller committed Dec 1, 2016
1 parent 8857846 commit 6060298
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions kernel/audit.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit 6060298

Please sign in to comment.