diff options
author | David S. Miller <davem@davemloft.net> | 2009-03-05 02:46:25 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-05 02:46:25 -0500 |
commit | 9d40bbda599def1e1d155d7f7dca14fe8744bd2b (patch) | |
tree | d246fbaec294830ecab0bb4b3b38d925abb5ffd8 /include/linux | |
parent | 54acd0efab072cb70e87206329d561b297f93bbb (diff) |
vlan: Fix vlan-in-vlan crashes.
As analyzed by Patrick McHardy, vlan needs to reset it's
netdev_ops pointer in it's ->init() function but this
leaves the compat method pointers stale.
Add a netdev_resync_ops() and call it from the vlan code.
Any other driver which changes ->netdev_ops after register_netdevice()
will need to call this new function after doing so too.
With help from Patrick McHardy.
Tested-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/netdevice.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index ec54785d34f9..659366734f3f 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -1079,6 +1079,7 @@ extern void synchronize_net(void); | |||
1079 | extern int register_netdevice_notifier(struct notifier_block *nb); | 1079 | extern int register_netdevice_notifier(struct notifier_block *nb); |
1080 | extern int unregister_netdevice_notifier(struct notifier_block *nb); | 1080 | extern int unregister_netdevice_notifier(struct notifier_block *nb); |
1081 | extern int init_dummy_netdev(struct net_device *dev); | 1081 | extern int init_dummy_netdev(struct net_device *dev); |
1082 | extern void netdev_resync_ops(struct net_device *dev); | ||
1082 | 1083 | ||
1083 | extern int call_netdevice_notifiers(unsigned long val, struct net_device *dev); | 1084 | extern int call_netdevice_notifiers(unsigned long val, struct net_device *dev); |
1084 | extern struct net_device *dev_get_by_index(struct net *net, int ifindex); | 1085 | extern struct net_device *dev_get_by_index(struct net *net, int ifindex); |