diff options
author | David S. Miller <davem@davemloft.net> | 2009-03-04 23:46:25 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-04 23:46:25 -0800 |
commit | 9d40bbda599def1e1d155d7f7dca14fe8744bd2b (patch) | |
tree | d246fbaec294830ecab0bb4b3b38d925abb5ffd8 /include | |
parent | 54acd0efab072cb70e87206329d561b297f93bbb (diff) | |
download | linux-3.10-9d40bbda599def1e1d155d7f7dca14fe8744bd2b.tar.gz linux-3.10-9d40bbda599def1e1d155d7f7dca14fe8744bd2b.tar.bz2 linux-3.10-9d40bbda599def1e1d155d7f7dca14fe8744bd2b.zip |
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')
-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 ec54785d34f..659366734f3 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -1079,6 +1079,7 @@ extern void synchronize_net(void); extern int register_netdevice_notifier(struct notifier_block *nb); extern int unregister_netdevice_notifier(struct notifier_block *nb); extern int init_dummy_netdev(struct net_device *dev); +extern void netdev_resync_ops(struct net_device *dev); extern int call_netdevice_notifiers(unsigned long val, struct net_device *dev); extern struct net_device *dev_get_by_index(struct net *net, int ifindex); |