From 6530e0fee1834fab51720769ac422186de2b3120 Mon Sep 17 00:00:00 2001 From: "remi.denis-courmont@nokia" Date: Fri, 23 Jan 2009 03:00:29 +0000 Subject: [PATCH] Phonet: remove useless locking in device cleanup MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: David S. Miller --- net/phonet/pn_dev.c | 7 +------ 1 file changed, 1 insertion(+), 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); } -- 2.20.1