]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/3.19.2/net-pktgen-disable-xmit_clone-on-virtual-devices.patch
4.14-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 3.19.2 / net-pktgen-disable-xmit_clone-on-virtual-devices.patch
1 From foo@baz Wed Mar 11 11:44:33 CET 2015
2 From: Eric Dumazet <edumazet@google.com>
3 Date: Sun, 22 Feb 2015 17:03:41 -0800
4 Subject: net: pktgen: disable xmit_clone on virtual devices
5
6 From: Eric Dumazet <edumazet@google.com>
7
8 [ Upstream commit 52d6c8c6ca125872459054daa70f2f1c698c8e75 ]
9
10 Trying to use burst capability (aka xmit_more) on a virtual device
11 like bonding is not supported.
12
13 For example, skb might be queued multiple times on a qdisc, with
14 various list corruptions.
15
16 Fixes: 38b2cf2982dc ("net: pktgen: packet bursting via skb->xmit_more")
17 Signed-off-by: Eric Dumazet <edumazet@google.com>
18 Cc: Alexei Starovoitov <ast@plumgrid.com>
19 Acked-by: Alexei Starovoitov <ast@plumgrid.com>
20 Signed-off-by: David S. Miller <davem@davemloft.net>
21 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
22 ---
23 net/core/pktgen.c | 3 +++
24 1 file changed, 3 insertions(+)
25
26 --- a/net/core/pktgen.c
27 +++ b/net/core/pktgen.c
28 @@ -1134,6 +1134,9 @@ static ssize_t pktgen_if_write(struct fi
29 return len;
30
31 i += len;
32 + if ((value > 1) &&
33 + (!(pkt_dev->odev->priv_flags & IFF_TX_SKB_SHARING)))
34 + return -ENOTSUPP;
35 pkt_dev->burst = value < 1 ? 1 : value;
36 sprintf(pg_result, "OK: burst=%d", pkt_dev->burst);
37 return count;