Skip to content

Commit

Permalink
phonet: exit_net cleanup check added
Browse files Browse the repository at this point in the history
Be sure that pndevs.list 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 1e7af3b commit ae61e8c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions net/phonet/pn_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,10 @@ static int __net_init phonet_init_net(struct net *net)

static void __net_exit phonet_exit_net(struct net *net)
{
struct phonet_net *pnn = phonet_pernet(net);

remove_proc_entry("phonet", net->proc_net);
WARN_ON_ONCE(!list_empty(&pnn->pndevs.list));
}

static struct pernet_operations phonet_net_ops = {
Expand Down

0 comments on commit ae61e8c

Please sign in to comment.