summaryrefslogtreecommitdiffhomepage
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
commit0d74fdc37a734eafc907c2c5a52d6aef2d588e9b (patch)
treebfb34d31caa91483a576e6db76b30d66a5027f1a
parent88ed7d0377418cf27681c34c18e7dc1dbef21296 (diff)
device: please lockdep
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-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);