1 From: jbeulich@novell.com
2 Subject: Module use count must be updated as bridges are created/destroyed
3 Patch-mainline: unknown
6 Otherwise 'modprobe -r' on a module having a dependency on bridge will
7 implicitly unload bridge, bringing down all connectivity that was using
11 net/bridge/br_if.c | 9 +++++++++
12 1 file changed, 9 insertions(+)
14 --- a/net/bridge/br_if.c
15 +++ b/net/bridge/br_if.c
16 @@ -271,6 +271,11 @@ int br_add_bridge(const char *name)
20 + if (!try_module_get(THIS_MODULE)) {
26 if (strchr(dev->name, '%')) {
27 ret = dev_alloc_name(dev, dev->name);
28 @@ -287,6 +292,8 @@ int br_add_bridge(const char *name)
29 unregister_netdevice(dev);
33 + module_put(THIS_MODULE);
37 @@ -318,6 +325,8 @@ int br_del_bridge(const char *name)
38 del_br(netdev_priv(dev));
42 + module_put(THIS_MODULE);