vlan: Fix register_vlan_dev() error path
authorEric Dumazet <eric.dumazet@gmail.com>
Tue, 17 Nov 2009 14:45:04 +0000 (06:45 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 17 Nov 2009 14:45:04 +0000 (06:45 -0800)
commit6b863d1d3239eff0f45c2e6e672f5b56db828db0
tree8384f6f29891d684725015e1dad5a96e6d9fb8fc
parent69c0cab120a85471054614418b447349caba22d7
vlan: Fix register_vlan_dev() error path

In case register_netdevice() returns an error, and a new vlan_group
was allocated and inserted in vlan_group_hash[] we call
vlan_group_free() without deleting group from hash table. Future
lookups can give infinite loops or crashes.

We must delete the vlan_group using RCU safe procedure.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/8021q/vlan.c