summaryrefslogtreecommitdiffstats
path: root/main/linux-grsec
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2012-09-12 11:27:18 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2012-09-12 11:46:28 +0000
commit912b72a0b6583ff84ac47f8d255b7adcf9060612 (patch)
tree8de4262ddf4343174b4dee83f67d9a977fc2dfff /main/linux-grsec
parentd0a0d672d71b425fa0bb61ed49d17dbc8aa95f2e (diff)
downloadaports-912b72a0b6583ff84ac47f8d255b7adcf9060612.tar.bz2
aports-912b72a0b6583ff84ac47f8d255b7adcf9060612.tar.xz
main/linux-grsec: add intel_idle patch from upstream
Fixes issue with Xen dom0 http://lists.xen.org/archives/html/xen-devel/2012-07/msg01838.html
Diffstat (limited to 'main/linux-grsec')
-rw-r--r--main/linux-grsec/APKBUILD4
-rw-r--r--main/linux-grsec/intel_idle.patch34
2 files changed, 37 insertions, 1 deletions
diff --git a/main/linux-grsec/APKBUILD b/main/linux-grsec/APKBUILD
index 1fbb55650..90db5161d 100644
--- a/main/linux-grsec/APKBUILD
+++ b/main/linux-grsec/APKBUILD
@@ -4,7 +4,7 @@ _flavor=grsec
pkgname=linux-${_flavor}
pkgver=3.4.10
_kernver=3.4
-pkgrel=0
+pkgrel=1
pkgdesc="Linux kernel with grsecurity"
url=http://grsecurity.net
depends="mkinitfs linux-firmware"
@@ -18,6 +18,7 @@ source="http://ftp.kernel.org/pub/linux/kernel/v3.x/linux-$_kernver.tar.xz
0004-arp-flush-arp-cache-on-device-change.patch
0001-Revert-ipv4-Don-t-use-the-cached-pmtu-informations-f.patch
+ intel_idle.patch
kernelconfig.x86
kernelconfig.x86_64
@@ -144,5 +145,6 @@ md5sums="967f72983655e2479f951195953e8480 linux-3.4.tar.xz
e495e6b5cad4fbd55ba394c7bd351be7 grsecurity-2.9.1-3.4.10-1.patch
776adeeb5272093574f8836c5037dd7d 0004-arp-flush-arp-cache-on-device-change.patch
cb6fcd6e966e73c87a839c4c0183f81f 0001-Revert-ipv4-Don-t-use-the-cached-pmtu-informations-f.patch
+d2f7ba780ff7567c21381428264d7fdd intel_idle.patch
50a13359236dbd676fa355f0b4fd27ff kernelconfig.x86
c402f52babc729d1280c1677075aa0d7 kernelconfig.x86_64"
diff --git a/main/linux-grsec/intel_idle.patch b/main/linux-grsec/intel_idle.patch
new file mode 100644
index 000000000..4cc4dd680
--- /dev/null
+++ b/main/linux-grsec/intel_idle.patch
@@ -0,0 +1,34 @@
+From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
+Date: Thu, 16 Aug 2012 20:06:55 +0000 (+0200)
+Subject: intel_idle: Check cpu_idle_get_driver() for NULL before dereferencing it.
+X-Git-Tag: v3.6-rc3~33^2
+X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux.git;a=commitdiff_plain;h=3735d524da64b70b41c764359da36f88aded3610
+
+intel_idle: Check cpu_idle_get_driver() for NULL before dereferencing it.
+
+If the machine is booted without any cpu_idle driver set
+(b/c disable_cpuidle() has been called) we should follow
+other users of cpu_idle API and check the return value
+for NULL before using it.
+
+Reported-and-tested-by: Mark van Dijk <mark@internecto.net>
+Suggested-by: Jan Beulich <JBeulich@suse.com>
+Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
+Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
+---
+
+diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
+index f559088..e872617 100644
+--- a/drivers/idle/intel_idle.c
++++ b/drivers/idle/intel_idle.c
+@@ -606,8 +606,9 @@ static int __init intel_idle_init(void)
+ intel_idle_cpuidle_driver_init();
+ retval = cpuidle_register_driver(&intel_idle_driver);
+ if (retval) {
++ struct cpuidle_driver *drv = cpuidle_get_driver();
+ printk(KERN_DEBUG PREFIX "intel_idle yielding to %s",
+- cpuidle_get_driver()->name);
++ drv ? drv->name : "none");
+ return retval;
+ }
+