Skip to content

Commit

Permalink
Phonet: remove useless locking in device cleanup
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
remi.denis-courmont@nokia authored and David S. Miller committed Jan 27, 2009
1 parent 660f706 commit 6530e0f
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions net/phonet/pn_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

0 comments on commit 6530e0f

Please sign in to comment.