[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200214225723.63646-5-Jason@zx2c4.com>
Date: Fri, 14 Feb 2020 23:57:23 +0100
From: "Jason A. Donenfeld" <Jason@...c4.com>
To: davem@...emloft.net, netdev@...r.kernel.org
Cc: "Jason A. Donenfeld" <Jason@...c4.com>,
Eric Dumazet <eric.dumazet@...il.com>
Subject: [PATCH v3 net 4/4] wireguard: socket: remove extra call to synchronize_net
synchronize_net() is a wrapper around synchronize_rcu(), so there's no
point in having synchronize_net and synchronize_rcu back to back,
despite the documentation comment suggesting maybe it's somewhat useful,
"Wait for packets currently being received to be done." This commit
removes the extra call.
Signed-off-by: Jason A. Donenfeld <Jason@...c4.com>
Suggested-by: Eric Dumazet <eric.dumazet@...il.com>
---
drivers/net/wireguard/socket.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/wireguard/socket.c b/drivers/net/wireguard/socket.c
index 262f3b5c819d..b0d6541582d3 100644
--- a/drivers/net/wireguard/socket.c
+++ b/drivers/net/wireguard/socket.c
@@ -432,7 +432,6 @@ void wg_socket_reinit(struct wg_device *wg, struct sock *new4,
wg->incoming_port = ntohs(inet_sk(new4)->inet_sport);
mutex_unlock(&wg->socket_update_lock);
synchronize_rcu();
- synchronize_net();
sock_free(old4);
sock_free(old6);
}
--
2.25.0
Powered by blists - more mailing lists