aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/device.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2017-11-03 15:21:17 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2017-11-03 15:21:17 +0100
commit0ac8efd24b5a281fbf9ddaf2b57c677e96663303 (patch)
treefb76fec9984d49f3497e64bf594c0eabe231c19b /src/device.c
parentglobal: revert checkpatch.pl changes (diff)
downloadwireguard-monolithic-historical-0ac8efd24b5a281fbf9ddaf2b57c677e96663303.tar.xz
wireguard-monolithic-historical-0ac8efd24b5a281fbf9ddaf2b57c677e96663303.zip
device: please lockdep
Diffstat (limited to 'src/device.c')
-rw-r--r--src/device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/device.c b/src/device.c
index 8195611..efd0340 100644
--- a/src/device.c
+++ b/src/device.c
@@ -204,10 +204,10 @@ static void destruct(struct net_device *dev)
{
struct wireguard_device *wg = netdev_priv(dev);
- mutex_lock(&wg->device_update_lock);
rtnl_lock();
list_del(&wg->device_list);
rtnl_unlock();
+ mutex_lock(&wg->device_update_lock);
peer_remove_all(wg); /* The final references are cleared in the below calls to destroy_workqueue. */
wg->incoming_port = 0;
destroy_workqueue(wg->handshake_receive_wq);