Skip to content

Commit ae61e8c

Browse files
vaverindavem330
authored andcommitted
phonet: exit_net cleanup check added
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]>
1 parent 1e7af3b commit ae61e8c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

net/phonet/pn_dev.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,10 @@ static int __net_init phonet_init_net(struct net *net)
331331

332332
static void __net_exit phonet_exit_net(struct net *net)
333333
{
334+
struct phonet_net *pnn = phonet_pernet(net);
335+
334336
remove_proc_entry("phonet", net->proc_net);
337+
WARN_ON_ONCE(!list_empty(&pnn->pndevs.list));
335338
}
336339

337340
static struct pernet_operations phonet_net_ops = {

0 commit comments

Comments
 (0)