Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6530e0fe authored by remi.denis-courmont@nokia's avatar remi.denis-courmont@nokia Committed by David S. Miller
Browse files

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: default avatarRémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 660f706d
Loading
Loading
Loading
Loading
+1 −6
Original line number Original line Diff line number Diff line
@@ -204,13 +204,8 @@ void phonet_device_exit(void)
	struct phonet_device *pnd, *n;
	struct phonet_device *pnd, *n;


	rtnl_unregister_all(PF_PHONET);
	rtnl_unregister_all(PF_PHONET);
	rtnl_lock();
	unregister_netdevice_notifier(&phonet_device_notifier);
	spin_lock_bh(&pndevs.lock);


	list_for_each_entry_safe(pnd, n, &pndevs.list, list)
	list_for_each_entry_safe(pnd, n, &pndevs.list, list)
		__phonet_device_free(pnd);
		__phonet_device_free(pnd);

	spin_unlock_bh(&pndevs.lock);
	rtnl_unlock();
	unregister_netdevice_notifier(&phonet_device_notifier);
}
}