From 0d74fdc37a734eafc907c2c5a52d6aef2d588e9b Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Fri, 3 Nov 2017 15:21:17 +0100 Subject: device: please lockdep Signed-off-by: Jason A. Donenfeld --- src/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/device.c') 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); -- cgit v1.2.3