mirror of
https://github.com/torvalds/linux.git
synced 2024-11-27 22:51:35 +00:00
ppp: Do not free not yet unregistered net device.
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>
This commit is contained in:
parent
01b7a31429
commit
4b95ede6f6
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user