Skip to content

Commit

Permalink
ppp: Do not free not yet unregistered net device.
Browse files Browse the repository at this point in the history
An error path in ppp_create_interface() lacks one and may
BUG in free_netdev() checking for proper dev->reg_state.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Pavel Emelyanov authored and David S. Miller committed May 14, 2008
1 parent 01b7a31 commit 4b95ede
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/ppp_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -2458,6 +2458,7 @@ ppp_create_interface(int unit, int *retp)

out3:
atomic_dec(&ppp_unit_count);
unregister_netdev(dev);
out2:
mutex_unlock(&all_ppp_mutex);
free_netdev(dev);
Expand Down

0 comments on commit 4b95ede

Please sign in to comment.