aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2013-01-11 21:03:19 +0200
committerTimo Teräs <timo.teras@iki.fi>2013-01-11 21:08:16 +0200
commit1696949be1f50d49f5798a6105c348f785f01acc (patch)
treee5cd4b705fbb231835904dc2a20c63d4842319b4
parent8b8a5b25699ecf5b3997b66e06473b660cd1d407 (diff)
downloadalpine_aports-1696949be1f50d49f5798a6105c348f785f01acc.tar.bz2
alpine_aports-1696949be1f50d49f5798a6105c348f785f01acc.tar.xz
alpine_aports-1696949be1f50d49f5798a6105c348f785f01acc.zip
main/linux-grsec: additional r8169 fix cherry-picked from upstream
-rw-r--r--main/linux-grsec/0001-r8169-avoid-NAPI-scheduling-delay.patch52
-rw-r--r--main/linux-grsec/APKBUILD5
2 files changed, 56 insertions, 1 deletions
diff --git a/main/linux-grsec/0001-r8169-avoid-NAPI-scheduling-delay.patch b/main/linux-grsec/0001-r8169-avoid-NAPI-scheduling-delay.patch
new file mode 100644
index 0000000000..a06c4c03f1
--- /dev/null
+++ b/main/linux-grsec/0001-r8169-avoid-NAPI-scheduling-delay.patch
@@ -0,0 +1,52 @@
1From 7dbb491878a2c51d372a8890fa45a8ff80358af1 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?fran=C3=A7ois=20romieu?= <romieu@fr.zoreil.com>
3Date: Sat, 9 Jun 2012 10:53:16 +0000
4Subject: [PATCH] r8169: avoid NAPI scheduling delay.
5
6While reworking the r8169 driver a few months ago to perform the
7smallest amount of work in the irq handler, I took care of avoiding
8any irq mask register operation in the slow work dedicated user
9context thread. The slow work thread scheduled an extra round of NAPI
10work which would ultimately set the irq mask register as required,
11thus keeping such irq mask operations in the NAPI handler.
12It would eventually race with the irq handler and delay NAPI execution
13for - assuming no further irq - a whole ksoftirqd period. Mildly a
14problem for rare link changes or corner case PCI events.
15
16The race was always lost after the last bh disabling lock had been
17removed from the work thread and people started wondering where those
18pesky "NOHZ: local_softirq_pending 08" messages came from.
19
20Actually the irq mask register _can_ be set up directly in the slow
21work thread.
22
23Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
24Reported-by: Dave Jones <davej@redhat.com>
25Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
26Cc: Thomas Gleixner <tglx@linutronix.de>
27Cc: Hayes Wang <hayeswang@realtek.com>
28Signed-off-by: David S. Miller <davem@davemloft.net>
29---
30 drivers/net/ethernet/realtek/r8169.c | 6 +-----
31 1 file changed, 1 insertion(+), 5 deletions(-)
32
33diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
34index 9757ce3..7260aa7 100644
35--- a/drivers/net/ethernet/realtek/r8169.c
36+++ b/drivers/net/ethernet/realtek/r8169.c
37@@ -5889,11 +5889,7 @@ static void rtl_slow_event_work(struct rtl8169_private *tp)
38 if (status & LinkChg)
39 __rtl8169_check_link_status(dev, tp, tp->mmio_addr, true);
40
41- napi_disable(&tp->napi);
42- rtl_irq_disable(tp);
43-
44- napi_enable(&tp->napi);
45- napi_schedule(&tp->napi);
46+ rtl_irq_enable_all(tp);
47 }
48
49 static void rtl_task(struct work_struct *work)
50--
511.8.1
52
diff --git a/main/linux-grsec/APKBUILD b/main/linux-grsec/APKBUILD
index ee50cd19b9..68db9fbb23 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.4.24 5pkgver=3.4.24
6_kernver=3.4 6_kernver=3.4
7pkgrel=1 7pkgrel=2
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"
@@ -19,6 +19,8 @@ source="http://ftp.kernel.org/pub/linux/kernel/v3.x/linux-$_kernver.tar.xz
19 0004-arp-flush-arp-cache-on-device-change.patch 19 0004-arp-flush-arp-cache-on-device-change.patch
20 0001-Revert-ipv4-Don-t-use-the-cached-pmtu-informations-f.patch 20 0001-Revert-ipv4-Don-t-use-the-cached-pmtu-informations-f.patch
21 intel_idle.patch 21 intel_idle.patch
22
23 0001-r8169-avoid-NAPI-scheduling-delay.patch
22 r8169-num-rx-desc.patch 24 r8169-num-rx-desc.patch
23 25
24 kernelconfig.x86 26 kernelconfig.x86
@@ -147,6 +149,7 @@ f23a2fcf6562f3219e43385c787cff23 grsecurity-2.9.1-3.4.24-0.patch
147776adeeb5272093574f8836c5037dd7d 0004-arp-flush-arp-cache-on-device-change.patch 149776adeeb5272093574f8836c5037dd7d 0004-arp-flush-arp-cache-on-device-change.patch
148cb6fcd6e966e73c87a839c4c0183f81f 0001-Revert-ipv4-Don-t-use-the-cached-pmtu-informations-f.patch 150cb6fcd6e966e73c87a839c4c0183f81f 0001-Revert-ipv4-Don-t-use-the-cached-pmtu-informations-f.patch
149d2f7ba780ff7567c21381428264d7fdd intel_idle.patch 151d2f7ba780ff7567c21381428264d7fdd intel_idle.patch
1528e5611c6bf3dfb0008d4e58051a8b0ff 0001-r8169-avoid-NAPI-scheduling-delay.patch
150daf2cbb558588c49c138fe9ca2482b64 r8169-num-rx-desc.patch 153daf2cbb558588c49c138fe9ca2482b64 r8169-num-rx-desc.patch
15150a13359236dbd676fa355f0b4fd27ff kernelconfig.x86 15450a13359236dbd676fa355f0b4fd27ff kernelconfig.x86
152c402f52babc729d1280c1677075aa0d7 kernelconfig.x86_64" 155c402f52babc729d1280c1677075aa0d7 kernelconfig.x86_64"