diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2013-01-28 13:00:12 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2013-01-28 13:00:12 +0000 |
commit | 409ef9327fc0b83be7542328e415172b5727e537 (patch) | |
tree | c11803a7a821d853574028a9a2ce56d484614d7a /main/linux-grsec | |
parent | 8c30627dd417f86833ccb0c00c8b23036b885bae (diff) | |
download | aports-409ef9327fc0b83be7542328e415172b5727e537.tar.bz2 aports-409ef9327fc0b83be7542328e415172b5727e537.tar.xz |
main/linux-grsec: r8169: fix vlan tag reordering
Diffstat (limited to 'main/linux-grsec')
-rw-r--r-- | main/linux-grsec/APKBUILD | 4 | ||||
-rw-r--r-- | main/linux-grsec/r8169-fix-vlan-tag-reordering.patch | 73 |
2 files changed, 76 insertions, 1 deletions
diff --git a/main/linux-grsec/APKBUILD b/main/linux-grsec/APKBUILD index f437e908d8..6aa9e283e9 100644 --- a/main/linux-grsec/APKBUILD +++ b/main/linux-grsec/APKBUILD @@ -4,7 +4,7 @@ _flavor=grsec pkgname=linux-${_flavor} pkgver=3.6.11 _kernver=3.6 -pkgrel=7 +pkgrel=8 pkgdesc="Linux kernel with grsecurity" url=http://grsecurity.net depends="mkinitfs linux-firmware" @@ -21,6 +21,7 @@ source="http://ftp.kernel.org/pub/linux/kernel/v3.x/linux-$_kernver.tar.xz r8169-num-rx-desc.patch ipv4-remove-output-route-check-in-ipv4_mtu.patch 0001-r8169-remove-the-obsolete-and-incorrect-AMD-workarou.patch + r8169-fix-vlan-tag-reordering.patch kernelconfig.x86 kernelconfig.x86_64 @@ -150,5 +151,6 @@ bd4bba74093405887d521309a74c19e9 patch-3.6.11.xz daf2cbb558588c49c138fe9ca2482b64 r8169-num-rx-desc.patch d9b4a528e722d10ba53034ebd440c31b ipv4-remove-output-route-check-in-ipv4_mtu.patch 63468b44e34fa19237e0a2a1f6737b14 0001-r8169-remove-the-obsolete-and-incorrect-AMD-workarou.patch +44a37e1289e1056300574848aea8bd31 r8169-fix-vlan-tag-reordering.patch 373db5888708938c6b1baed6da781fcb kernelconfig.x86 190788fb10e79abce9d570d5e87ec3b4 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 @@ +From ce11ff5e5963e441feb591e76278528f876c332d Mon Sep 17 00:00:00 2001 +From: =?utf8?q?fran=C3=A7ois=20romieu?= <romieu@fr.zoreil.com> +Date: Thu, 24 Jan 2013 13:30:06 +0000 +Subject: [PATCH] r8169: fix vlan tag read ordering. + +Control of receive descriptor must not be returned to ethernet chipset +before vlan tag processing is done. + +VLAN tag receive word is now reset both in normal and error path. + +Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> +Spotted-by: Timo Teras <timo.teras@iki.fi> +Cc: Hayes Wang <hayeswang@realtek.com> +Signed-off-by: David S. Miller <davem@davemloft.net> +--- + drivers/net/ethernet/realtek/r8169.c | 14 ++++++-------- + 1 files changed, 6 insertions(+), 8 deletions(-) + +diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c +index c28bc31..1170232 100644 +--- a/drivers/net/ethernet/realtek/r8169.c ++++ b/drivers/net/ethernet/realtek/r8169.c +@@ -1826,8 +1826,6 @@ static void rtl8169_rx_vlan_tag(struct RxDesc *desc, struct sk_buff *skb) + + if (opts2 & RxVlanTag) + __vlan_hwaccel_put_tag(skb, swab16(opts2 & 0xffff)); +- +- desc->opts2 = 0; + } + + static int rtl8169_gset_tbi(struct net_device *dev, struct ethtool_cmd *cmd) +@@ -6064,8 +6062,6 @@ static int rtl_rx(struct net_device *dev, struct rtl8169_private *tp, u32 budget + !(status & (RxRWT | RxFOVF)) && + (dev->features & NETIF_F_RXALL)) + goto process_pkt; +- +- rtl8169_mark_to_asic(desc, rx_buf_sz); + } else { + struct sk_buff *skb; + dma_addr_t addr; +@@ -6086,16 +6082,14 @@ process_pkt: + if (unlikely(rtl8169_fragmented_frame(status))) { + dev->stats.rx_dropped++; + dev->stats.rx_length_errors++; +- rtl8169_mark_to_asic(desc, rx_buf_sz); +- continue; ++ goto release_descriptor; + } + + skb = rtl8169_try_rx_copy(tp->Rx_databuff[entry], + tp, pkt_size, addr); +- rtl8169_mark_to_asic(desc, rx_buf_sz); + if (!skb) { + dev->stats.rx_dropped++; +- continue; ++ goto release_descriptor; + } + + rtl8169_rx_csum(skb, status); +@@ -6111,6 +6105,10 @@ process_pkt: + tp->rx_stats.bytes += pkt_size; + u64_stats_update_end(&tp->rx_stats.syncp); + } ++release_descriptor: ++ desc->opts2 = 0; ++ wmb(); ++ rtl8169_mark_to_asic(desc, rx_buf_sz); + } + + count = cur_rx - tp->cur_rx; +-- +1.7.6.5 + |