From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: davem@davemloft.net, netdev@vger.kernel.org
Cc: "Jason A. Donenfeld" <Jason@zx2c4.com>,
Eric Dumazet <eric.dumazet@gmail.com>
Subject: [PATCH v3 net 4/4] wireguard: socket: remove extra call to synchronize_net
Date: Fri, 14 Feb 2020 23:57:23 +0100 [thread overview]
Message-ID: <20200214225723.63646-5-Jason@zx2c4.com> (raw)
In-Reply-To: <20200214225723.63646-1-Jason@zx2c4.com>
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>
---
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
next prev parent reply other threads:[~2020-02-14 22:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-14 22:57 [PATCH v3 net 0/4] wireguard fixes for 5.6-rc2 Jason A. Donenfeld
2020-02-14 22:57 ` [PATCH v3 net 1/4] wireguard: selftests: reduce complexity and fix make races Jason A. Donenfeld
2020-02-14 22:57 ` [PATCH v3 net 2/4] wireguard: receive: reset last_under_load to zero Jason A. Donenfeld
2020-02-14 22:57 ` [PATCH v3 net 3/4] wireguard: send: account for mtu=0 devices Jason A. Donenfeld
2020-02-14 23:21 ` Eric Dumazet
2020-02-14 22:57 ` Jason A. Donenfeld [this message]
2020-02-14 23:21 ` [PATCH v3 net 4/4] wireguard: socket: remove extra call to synchronize_net Eric Dumazet
2020-02-17 3:22 ` [PATCH v3 net 0/4] wireguard fixes for 5.6-rc2 David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200214225723.63646-5-Jason@zx2c4.com \
--to=jason@zx2c4.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).