aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
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
commit704a0afb4963a486f604fba1064f9025e2865fc9 (patch)
tree59fc41ca864ea8f31820673fb0bf238070df1aff /drivers
parentMerge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue (diff)
parentwireguard: socket: mark skbs as not on list when receiving via gro (diff)
downloadlinux-dev-704a0afb4963a486f604fba1064f9025e2865fc9.tar.xz
linux-dev-704a0afb4963a486f604fba1064f9025e2865fc9.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>
Diffstat (limited to '')
-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 e49a464238fd..fecb559cbdb6 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 c46256d0d81c..262f3b5c819d 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;