diff options
| author | David S. Miller <davem@nuts.ninka.net> | 2003-05-19 04:30:48 -0700 |
|---|---|---|
| committer | David S. Miller <davem@nuts.ninka.net> | 2003-05-19 04:30:48 -0700 |
| commit | ff936f4e8148e75b20595eda5de6d3a4bb55b631 (patch) | |
| tree | 96e7b8175a9da098dde77ee24e030258a2fe4ee1 /include/linux/module.h | |
| parent | 3b1d5e1d06c7d8c6d24f565ef2a7d1cdfdf9a908 (diff) | |
[NET]: Fix netdevice unregister races.
We had two major issues when unregistering networking devices.
1) Even trying to run hotplug asynchronously could deadlock
if keventd was currently trying to get the RTNL semaphore
in order to process linkwatch events.
2) Unregister needs to wait for the last reference to go away
before the finalization of the unregister can execute. This
cannot occur under the RTNL semaphore as this is deadlock
prone as well.
The solution is to do all of this stuff after dropping the
RTNL semaphore. rtnl_lock, if it is about to protect a region
of code that could unregister network devices, registers a list
to which unregistered netdevs are attached. At rtnl_unlock time
this list is processed to wait for refcounts to drop to zero and
then finalize the unregister.
Diffstat (limited to 'include/linux/module.h')
| -rw-r--r-- | include/linux/module.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/include/linux/module.h b/include/linux/module.h index 4ddc5edcd22f..73e3de311d51 100644 --- a/include/linux/module.h +++ b/include/linux/module.h @@ -437,7 +437,6 @@ __attribute__((section(".gnu.linkonce.this_module"))) = { #endif /* MODULE */ #define symbol_request(x) try_then_request_module(symbol_get(x), "symbol:" #x) -#define SET_MODULE_OWNER(dev) ((dev)->owner = THIS_MODULE) /* BELOW HERE ALL THESE ARE OBSOLETE AND WILL VANISH */ |
