summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2020-01-05 14:08:32 -0800
committerDavid S. Miller <davem@davemloft.net>2020-01-05 14:08:32 -0800
commit620b15b8196a3a6d8632f4b03bb9a79eefab4c7c (patch)
tree73a05cab21a3f47181b261293b592f3f4abcc087
parentb085324b347d44ef258b311f76e537efc3203cf2 (diff)
parent937f24d132a86b82a9d43ad4b9a7e5a627ed630f (diff)
downloadwireguard-linux-trimmed-620b15b8196a3a6d8632f4b03bb9a79eefab4c7c.tar.gz
wireguard-linux-trimmed-620b15b8196a3a6d8632f4b03bb9a79eefab4c7c.zip
Merge branch 'WireGuard-bug-fixes-and-cleanups'
Jason A. Donenfeld says: ==================== WireGuard bug fixes and cleanups I've been working through some personal notes and also the whole git repo history of the out-of-tree module, looking for places where tradeoffs were made (and subsequently forgotten about) for old kernels. The first two patches in this series clean up those. The first one does so in the self-tests and self-test harness, where we're now able to expand test coverage by a bit, and we're now cooking away tests on every commit to both the wireguard-linux repo and to net-next. The second one removes a workaround for a skbuff.h bug that was fixed long ago. Finally, the last patch in the series fixes in a bug unearthed by newer Qualcomm chipsets running the rmnet_perf driver, which does UDP GRO. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/wireguard/queueing.h3
-rw-r--r--drivers/net/wireguard/socket.c1
2 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/wireguard/queueing.h b/drivers/net/wireguard/queueing.h
index e49a464..fecb559 100644
--- a/drivers/net/wireguard/queueing.h
+++ b/drivers/net/wireguard/queueing.h
@@ -83,13 +83,10 @@ static inline __be16 wg_skb_examine_untrusted_ip_hdr(struct sk_buff *skb)
static inline void wg_reset_packet(struct sk_buff *skb)
{
- const int pfmemalloc = skb->pfmemalloc;
-
skb_scrub_packet(skb, true);
memset(&skb->headers_start, 0,
offsetof(struct sk_buff, headers_end) -
offsetof(struct sk_buff, headers_start));
- skb->pfmemalloc = pfmemalloc;
skb->queue_mapping = 0;
skb->nohdr = 0;
skb->peeked = 0;
diff --git a/drivers/net/wireguard/socket.c b/drivers/net/wireguard/socket.c
index c46256d..262f3b5 100644
--- a/drivers/net/wireguard/socket.c
+++ b/drivers/net/wireguard/socket.c
@@ -333,6 +333,7 @@ static int wg_receive(struct sock *sk, struct sk_buff *skb)
wg = sk->sk_user_data;
if (unlikely(!wg))
goto err;
+ skb_mark_not_on_list(skb);
wg_packet_receive(wg, skb);
return 0;