提交 6530e0fe 编写于 作者: R remi.denis-courmont@nokia 提交者: David S. Miller

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: NRémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 660f706d
......@@ -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);
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册