1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2 From: "Jason A. Donenfeld" <Jason@zx2c4.com>
3 Date: Thu, 2 Jan 2020 17:47:51 +0100
4 Subject: [PATCH] wireguard: socket: mark skbs as not on list when receiving
7 commit 736775d06bac60d7a353e405398b48b2bd8b1e54 upstream.
9 Certain drivers will pass gro skbs to udp, at which point the udp driver
10 simply iterates through them and passes them off to encap_rcv, which is
11 where we pick up. At the moment, we're not attempting to coalesce these
12 into bundles, but we also don't want to wind up having cascaded lists of
13 skbs treated separately. The right behavior here, then, is to just mark
14 each incoming one as not on a list. This can be seen in practice, for
15 example, with Qualcomm's rmnet_perf driver.
17 Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
18 Tested-by: Yaroslav Furman <yaro330@gmail.com>
19 Signed-off-by: David S. Miller <davem@davemloft.net>
20 Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
22 drivers/net/wireguard/socket.c | 1 +
23 1 file changed, 1 insertion(+)
25 --- a/drivers/net/wireguard/socket.c
26 +++ b/drivers/net/wireguard/socket.c
27 @@ -333,6 +333,7 @@ static int wg_receive(struct sock *sk, s
28 wg = sk->sk_user_data;
31 + skb_mark_not_on_list(skb);
32 wg_packet_receive(wg, skb);