diff options
author | Patrick McHardy <kaber@trash.net> | 2008-01-21 03:25:50 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:08:31 -0500 |
commit | af30151709bcace1ca844d4bb8b7e2e392ff81eb (patch) | |
tree | 5da346ea833fe8097359613463cd716613359215 /net/8021q/vlan.h | |
parent | acc5efbcd2a023c8801f2bba39971cf93812ce7c (diff) |
[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>
Diffstat (limited to 'net/8021q/vlan.h')
-rw-r--r-- | net/8021q/vlan.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/8021q/vlan.h b/net/8021q/vlan.h index 56378651cc46..0cfdf77b497c 100644 --- a/net/8021q/vlan.h +++ b/net/8021q/vlan.h | |||
@@ -38,7 +38,7 @@ void vlan_dev_get_vid(const struct net_device *dev, unsigned short *result); | |||
38 | int vlan_check_real_dev(struct net_device *real_dev, unsigned short vlan_id); | 38 | int vlan_check_real_dev(struct net_device *real_dev, unsigned short vlan_id); |
39 | void vlan_setup(struct net_device *dev); | 39 | void vlan_setup(struct net_device *dev); |
40 | int register_vlan_dev(struct net_device *dev); | 40 | int register_vlan_dev(struct net_device *dev); |
41 | int unregister_vlan_device(struct net_device *dev); | 41 | void unregister_vlan_dev(struct net_device *dev); |
42 | 42 | ||
43 | int vlan_netlink_init(void); | 43 | int vlan_netlink_init(void); |
44 | void vlan_netlink_fini(void); | 44 | void vlan_netlink_fini(void); |