aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2013-01-28 13:00:12 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2013-02-01 15:52:47 +0000
commitf45f136baa3fb13889804d362082498d72da72fe (patch)
treeb1c2c2667bf1ea6060a83c792c61ae5d0e7b5103
parent785eeb30457539c4be3484278cc7899fda596acf (diff)
downloadalpine_aports-f45f136baa3fb13889804d362082498d72da72fe.tar.bz2
alpine_aports-f45f136baa3fb13889804d362082498d72da72fe.tar.xz
alpine_aports-f45f136baa3fb13889804d362082498d72da72fe.zip
main/linux-grsec: r8169: fix vlan tag reordering (cherry picked from commit 409ef9327fc0b83be7542328e415172b5727e537)
Conflicts: main/linux-grsec/APKBUILD
-rw-r--r--main/linux-grsec/APKBUILD4
-rw-r--r--main/linux-grsec/r8169-fix-vlan-tag-reordering.patch73
2 files changed, 76 insertions, 1 deletions
diff --git a/main/linux-grsec/APKBUILD b/main/linux-grsec/APKBUILD
index 604ca3bd00..225d45a4ec 100644
--- a/main/linux-grsec/APKBUILD
+++ b/main/linux-grsec/APKBUILD
@@ -4,7 +4,7 @@ _flavor=grsec
4pkgname=linux-${_flavor} 4pkgname=linux-${_flavor}
5pkgver=3.6.11 5pkgver=3.6.11
6_kernver=3.6 6_kernver=3.6
7pkgrel=6 7pkgrel=7
8pkgdesc="Linux kernel with grsecurity" 8pkgdesc="Linux kernel with grsecurity"
9url=http://grsecurity.net 9url=http://grsecurity.net
10depends="mkinitfs linux-firmware" 10depends="mkinitfs linux-firmware"
@@ -21,6 +21,7 @@ source="http://ftp.kernel.org/pub/linux/kernel/v3.x/linux-$_kernver.tar.xz
21 r8169-num-rx-desc.patch 21 r8169-num-rx-desc.patch
22 ipv4-remove-output-route-check-in-ipv4_mtu.patch 22 ipv4-remove-output-route-check-in-ipv4_mtu.patch
23 0001-r8169-remove-the-obsolete-and-incorrect-AMD-workarou.patch 23 0001-r8169-remove-the-obsolete-and-incorrect-AMD-workarou.patch
24 r8169-fix-vlan-tag-reordering.patch
24 25
25 kernelconfig.x86 26 kernelconfig.x86
26 kernelconfig.x86_64 27 kernelconfig.x86_64
@@ -150,5 +151,6 @@ bd4bba74093405887d521309a74c19e9 patch-3.6.11.xz
150daf2cbb558588c49c138fe9ca2482b64 r8169-num-rx-desc.patch 151daf2cbb558588c49c138fe9ca2482b64 r8169-num-rx-desc.patch
151d9b4a528e722d10ba53034ebd440c31b ipv4-remove-output-route-check-in-ipv4_mtu.patch 152d9b4a528e722d10ba53034ebd440c31b ipv4-remove-output-route-check-in-ipv4_mtu.patch
15263468b44e34fa19237e0a2a1f6737b14 0001-r8169-remove-the-obsolete-and-incorrect-AMD-workarou.patch 15363468b44e34fa19237e0a2a1f6737b14 0001-r8169-remove-the-obsolete-and-incorrect-AMD-workarou.patch
15444a37e1289e1056300574848aea8bd31 r8169-fix-vlan-tag-reordering.patch
153373db5888708938c6b1baed6da781fcb kernelconfig.x86 155373db5888708938c6b1baed6da781fcb kernelconfig.x86
154190788fb10e79abce9d570d5e87ec3b4 kernelconfig.x86_64" 156190788fb10e79abce9d570d5e87ec3b4 kernelconfig.x86_64"
diff --git a/main/linux-grsec/r8169-fix-vlan-tag-reordering.patch b/main/linux-grsec/r8169-fix-vlan-tag-reordering.patch
new file mode 100644
index 0000000000..474e567471
--- /dev/null
+++ b/main/linux-grsec/r8169-fix-vlan-tag-reordering.patch
@@ -0,0 +1,73 @@
1From ce11ff5e5963e441feb591e76278528f876c332d Mon Sep 17 00:00:00 2001
2From: =?utf8?q?fran=C3=A7ois=20romieu?= <romieu@fr.zoreil.com>
3Date: Thu, 24 Jan 2013 13:30:06 +0000
4Subject: [PATCH] r8169: fix vlan tag read ordering.
5
6Control of receive descriptor must not be returned to ethernet chipset
7before vlan tag processing is done.
8
9VLAN tag receive word is now reset both in normal and error path.
10
11Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
12Spotted-by: Timo Teras <timo.teras@iki.fi>
13Cc: Hayes Wang <hayeswang@realtek.com>
14Signed-off-by: David S. Miller <davem@davemloft.net>
15---
16 drivers/net/ethernet/realtek/r8169.c | 14 ++++++--------
17 1 files changed, 6 insertions(+), 8 deletions(-)
18
19diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
20index c28bc31..1170232 100644
21--- a/drivers/net/ethernet/realtek/r8169.c
22+++ b/drivers/net/ethernet/realtek/r8169.c
23@@ -1826,8 +1826,6 @@ static void rtl8169_rx_vlan_tag(struct RxDesc *desc, struct sk_buff *skb)
24
25 if (opts2 & RxVlanTag)
26 __vlan_hwaccel_put_tag(skb, swab16(opts2 & 0xffff));
27-
28- desc->opts2 = 0;
29 }
30
31 static int rtl8169_gset_tbi(struct net_device *dev, struct ethtool_cmd *cmd)
32@@ -6064,8 +6062,6 @@ static int rtl_rx(struct net_device *dev, struct rtl8169_private *tp, u32 budget
33 !(status & (RxRWT | RxFOVF)) &&
34 (dev->features & NETIF_F_RXALL))
35 goto process_pkt;
36-
37- rtl8169_mark_to_asic(desc, rx_buf_sz);
38 } else {
39 struct sk_buff *skb;
40 dma_addr_t addr;
41@@ -6086,16 +6082,14 @@ process_pkt:
42 if (unlikely(rtl8169_fragmented_frame(status))) {
43 dev->stats.rx_dropped++;
44 dev->stats.rx_length_errors++;
45- rtl8169_mark_to_asic(desc, rx_buf_sz);
46- continue;
47+ goto release_descriptor;
48 }
49
50 skb = rtl8169_try_rx_copy(tp->Rx_databuff[entry],
51 tp, pkt_size, addr);
52- rtl8169_mark_to_asic(desc, rx_buf_sz);
53 if (!skb) {
54 dev->stats.rx_dropped++;
55- continue;
56+ goto release_descriptor;
57 }
58
59 rtl8169_rx_csum(skb, status);
60@@ -6111,6 +6105,10 @@ process_pkt:
61 tp->rx_stats.bytes += pkt_size;
62 u64_stats_update_end(&tp->rx_stats.syncp);
63 }
64+release_descriptor:
65+ desc->opts2 = 0;
66+ wmb();
67+ rtl8169_mark_to_asic(desc, rx_buf_sz);
68 }
69
70 count = cur_rx - tp->cur_rx;
71--
721.7.6.5
73