summaryrefslogtreecommitdiffstats
path: root/net/phonet/pn_dev.c
diff options
context:
space:
mode:
authorremi.denis-courmont@nokia <remi.denis-courmont@nokia>2009-01-23 04:00:29 +0100
committerDavid S. Miller <davem@davemloft.net>2009-01-27 06:03:35 +0100
commit6530e0fee1834fab51720769ac422186de2b3120 (patch)
tree9ee1860c9625ee8b19ff99ea6df230bfb60dd392 /net/phonet/pn_dev.c
parentPhonet: handle rtnetlink registration failure (diff)
downloadlinux-6530e0fee1834fab51720769ac422186de2b3120.tar.xz
linux-6530e0fee1834fab51720769ac422186de2b3120.zip
Phonet: remove useless locking in device cleanup
Incoming packets and sockets are already gone. The netdevice notifier is unregistered under the RTNL lock There remains a race with the rtnetlink handlers unregistration, but it is a generic RTNL issue that was already present before this change. Signed-off-by: RĂ©mi Denis-Courmont <remi.denis-courmont@nokia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/phonet/pn_dev.c')
-rw-r--r--net/phonet/pn_dev.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/net/phonet/pn_dev.c b/net/phonet/pn_dev.c
index fd418107652b..3e24c0522ee3 100644
--- a/net/phonet/pn_dev.c
+++ b/net/phonet/pn_dev.c
@@ -204,13 +204,8 @@ void phonet_device_exit(void)
struct phonet_device *pnd, *n;
rtnl_unregister_all(PF_PHONET);
- rtnl_lock();
- spin_lock_bh(&pndevs.lock);
+ unregister_netdevice_notifier(&phonet_device_notifier);
list_for_each_entry_safe(pnd, n, &pndevs.list, list)
__phonet_device_free(pnd);
-
- spin_unlock_bh(&pndevs.lock);
- rtnl_unlock();
- unregister_netdevice_notifier(&phonet_device_notifier);
}