summaryrefslogtreecommitdiff
path: root/drivers/net/wireguard/socket.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2020-02-14 23:57:23 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2022-07-07 13:26:41 +0200
commit7f301e56b9033259a207288022ec1cf763bc7718 (patch)
tree4bc9b26499acd15c65469afa567e8b61a0cfb652 /drivers/net/wireguard/socket.c
parent4a0c35d9c3953cb9b79684bd2bd015925ac1d2e1 (diff)
downloadwireguard-linux-trimmed-7f301e56b9033259a207288022ec1cf763bc7718.tar.gz
wireguard-linux-trimmed-7f301e56b9033259a207288022ec1cf763bc7718.zip
wireguard: socket: remove extra call to synchronize_net
commit 5c80736eb84941b393338b8af1e032a829d78654 upstream. 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@zx2c4.com> Suggested-by: Eric Dumazet <eric.dumazet@gmail.com> Reviewed-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'drivers/net/wireguard/socket.c')
-rw-r--r--drivers/net/wireguard/socket.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/net/wireguard/socket.c b/drivers/net/wireguard/socket.c
index 262f3b5..b0d6541 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);
}