]> pilppa.org Git - linux-2.6-omap-h63xx.git/commit
[VLAN]: Simplify vlan unregistration
authorPatrick McHardy <kaber@trash.net>
Mon, 21 Jan 2008 08:25:50 +0000 (00:25 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jan 2008 23:08:31 +0000 (15:08 -0800)
commitaf30151709bcace1ca844d4bb8b7e2e392ff81eb
tree5da346ea833fe8097359613463cd716613359215
parentacc5efbcd2a023c8801f2bba39971cf93812ce7c
[VLAN]: Simplify vlan unregistration

Keep track of the number of VLAN devices in a vlan group. This allows
to have the caller sense when the group is going to be destroyed and
stop using it, which in turn allows to remove the wrapper around
unregister_vlan_dev for the NETDEV_UNREGISTER notifier and avoid
iterating over all possible VLAN ids whenever a device in unregistered.

Also fix what looks like a use-after-free (but is actually safe since
we're holding the RTNL), the real_dev reference should not be dropped
while we still use it.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/if_vlan.h
net/8021q/vlan.c
net/8021q/vlan.h
net/8021q/vlan_netlink.c