Skip to content

Commit

Permalink
packet: exit_net cleanup check added
Browse files Browse the repository at this point in the history
Be sure that packet.sklist initialized in net_init hook was return
to initial state.

Signed-off-by: Vasily Averin <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
vaverin authored and davem330 committed Nov 14, 2017
1 parent ab384b6 commit 669f8f1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/packet/af_packet.c
Original file line number Diff line number Diff line change
Expand Up @@ -4560,6 +4560,7 @@ static int __net_init packet_net_init(struct net *net)
static void __net_exit packet_net_exit(struct net *net)
{
remove_proc_entry("packet", net->proc_net);
WARN_ON_ONCE(!hlist_empty(&net->packet.sklist));
}

static struct pernet_operations packet_net_ops = {
Expand Down

0 comments on commit 669f8f1

Please sign in to comment.