summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2019-12-16 19:22:22 -0800
committerDavid S. Miller <davem@davemloft.net>2019-12-16 19:22:22 -0800
commitb085324b347d44ef258b311f76e537efc3203cf2 (patch)
tree99500f642371cde1bf5a7dfe04ff4280c8efa745
parenta8f1bc7bdea3e5d4076f4e45a59c040d4c034f1f (diff)
parent4340ee1dafe3334901590ec73536c8d622af427c (diff)
downloadwireguard-linux-trimmed-b085324b347d44ef258b311f76e537efc3203cf2.tar.gz
wireguard-linux-trimmed-b085324b347d44ef258b311f76e537efc3203cf2.zip
Merge branch 'WireGuard-CI-and-housekeeping'
Jason A. Donenfeld says: ==================== WireGuard CI and housekeeping This is a collection of commits gathered during the last 1.5 weeks since merging WireGuard. If you'd prefer, I can send tree pull requests instead, but I figure it might be best for now to just send things as full patch sets to netdev. The first part of this adds in the CI test harness that we've been using for quite some time with success. You can type `make` and get the selftests running in a fresh VM immediately. This has been an instrumental tool in developing WireGuard, and I think it'd benefit most from being in-tree alongside the selftests that are already there. Once this lands, I plan to get build.wireguard.com building wireguard- linux.git and net-next.git on every single commit pushed, and do so on a bunch of different architectures. As this migrates into Linus' tree eventually and then into net.git, I'll get net.git building there too on every commit. Future work with this involves generalizing it to include more networking subsystem tests beyond just WireGuard, but one step at a time. In the process of porting this to the tree, the builder uncovered a mistake in the config menu file, which the second commit fixes. The last three commits are small housekeeping things, fixing spelling mistakes, replacing call_rcu with kfree_rcu, and removing an unused include. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/wireguard/allowedips.c7
-rw-r--r--drivers/net/wireguard/main.c1
-rw-r--r--drivers/net/wireguard/receive.c2
3 files changed, 2 insertions, 8 deletions
diff --git a/drivers/net/wireguard/allowedips.c b/drivers/net/wireguard/allowedips.c
index 72667d5..121d9ea 100644
--- a/drivers/net/wireguard/allowedips.c
+++ b/drivers/net/wireguard/allowedips.c
@@ -31,11 +31,6 @@ static void copy_and_assign_cidr(struct allowedips_node *node, const u8 *src,
#define CHOOSE_NODE(parent, key) \
parent->bit[(key[parent->bit_at_a] >> parent->bit_at_b) & 1]
-static void node_free_rcu(struct rcu_head *rcu)
-{
- kfree(container_of(rcu, struct allowedips_node, rcu));
-}
-
static void push_rcu(struct allowedips_node **stack,
struct allowedips_node __rcu *p, unsigned int *len)
{
@@ -112,7 +107,7 @@ static void walk_remove_by_peer(struct allowedips_node __rcu **top,
if (!node->bit[0] || !node->bit[1]) {
rcu_assign_pointer(*nptr, DEREF(
&node->bit[!REF(node->bit[0])]));
- call_rcu(&node->rcu, node_free_rcu);
+ kfree_rcu(node, rcu);
node = DEREF(nptr);
}
}
diff --git a/drivers/net/wireguard/main.c b/drivers/net/wireguard/main.c
index 10c0a40..7a7d5f1 100644
--- a/drivers/net/wireguard/main.c
+++ b/drivers/net/wireguard/main.c
@@ -12,7 +12,6 @@
#include <uapi/linux/wireguard.h>
-#include <linux/version.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/genetlink.h>
diff --git a/drivers/net/wireguard/receive.c b/drivers/net/wireguard/receive.c
index 7e675f5..9c6bab9 100644
--- a/drivers/net/wireguard/receive.c
+++ b/drivers/net/wireguard/receive.c
@@ -380,7 +380,7 @@ static void wg_packet_consume_data_done(struct wg_peer *peer,
/* We've already verified the Poly1305 auth tag, which means this packet
* was not modified in transit. We can therefore tell the networking
* stack that all checksums of every layer of encapsulation have already
- * been checked "by the hardware" and therefore is unneccessary to check
+ * been checked "by the hardware" and therefore is unnecessary to check
* again in software.
*/
skb->ip_summed = CHECKSUM_UNNECESSARY;