From: Greg Kroah-Hartman Date: Mon, 15 Oct 2012 18:47:46 +0000 (-0700) Subject: 3.0-stable patches X-Git-Tag: v3.0.47~32 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8e9db63e7af23cd1c5d2f4cf3aa3c2ad97f55562;p=thirdparty%2Fkernel%2Fstable-queue.git 3.0-stable patches added patches: module-taint-kernel-when-lve-module-is-loaded.patch timers-fix-endless-looping-between-cascade-and-internal_add_timer.patch viafb-don-t-touch-clock-state-on-olpc-xo-1.5.patch video-udlfb-fix-line-counting-in-fb_write.patch --- diff --git a/queue-3.0/module-taint-kernel-when-lve-module-is-loaded.patch b/queue-3.0/module-taint-kernel-when-lve-module-is-loaded.patch new file mode 100644 index 00000000000..c4d3b672bb4 --- /dev/null +++ b/queue-3.0/module-taint-kernel-when-lve-module-is-loaded.patch @@ -0,0 +1,36 @@ +From c99af3752bb52ba3aece5315279a57a477edfaf1 Mon Sep 17 00:00:00 2001 +From: Matthew Garrett +Date: Fri, 22 Jun 2012 13:49:31 -0400 +Subject: module: taint kernel when lve module is loaded + +From: Matthew Garrett + +commit c99af3752bb52ba3aece5315279a57a477edfaf1 upstream. + +Cloudlinux have a product called lve that includes a kernel module. This +was previously GPLed but is now under a proprietary license, but the +module continues to declare MODULE_LICENSE("GPL") and makes use of some +EXPORT_SYMBOL_GPL symbols. Forcibly taint it in order to avoid this. + +Signed-off-by: Matthew Garrett +Cc: Alex Lyashkov +Signed-off-by: Rusty Russell +Signed-off-by: Greg Kroah-Hartman + +--- + kernel/module.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/kernel/module.c ++++ b/kernel/module.c +@@ -2605,6 +2605,10 @@ static int check_module_license_and_vers + if (strcmp(mod->name, "driverloader") == 0) + add_taint_module(mod, TAINT_PROPRIETARY_MODULE); + ++ /* lve claims to be GPL but upstream won't provide source */ ++ if (strcmp(mod->name, "lve") == 0) ++ add_taint_module(mod, TAINT_PROPRIETARY_MODULE); ++ + #ifdef CONFIG_MODVERSIONS + if ((mod->num_syms && !mod->crcs) + || (mod->num_gpl_syms && !mod->gpl_crcs) diff --git a/queue-3.0/series b/queue-3.0/series index 07e12f2ee39..23d790e9b9f 100644 --- a/queue-3.0/series +++ b/queue-3.0/series @@ -11,3 +11,7 @@ xen-bootup-allow-read-write-_cr8-pvops-call.patch xen-bootup-allow-read_tscp-call-for-xen-pv-guests.patch block-fix-request_queue-flags-initialization.patch autofs4-fix-reset-pending-flag-on-mount-fail.patch +module-taint-kernel-when-lve-module-is-loaded.patch +video-udlfb-fix-line-counting-in-fb_write.patch +viafb-don-t-touch-clock-state-on-olpc-xo-1.5.patch +timers-fix-endless-looping-between-cascade-and-internal_add_timer.patch diff --git a/queue-3.0/timers-fix-endless-looping-between-cascade-and-internal_add_timer.patch b/queue-3.0/timers-fix-endless-looping-between-cascade-and-internal_add_timer.patch new file mode 100644 index 00000000000..7b2a8882c56 --- /dev/null +++ b/queue-3.0/timers-fix-endless-looping-between-cascade-and-internal_add_timer.patch @@ -0,0 +1,57 @@ +From 26cff4e2aa4d666dc6a120ea34336b5057e3e187 Mon Sep 17 00:00:00 2001 +From: "Hildner, Christian" +Date: Mon, 8 Oct 2012 15:49:03 +0200 +Subject: timers: Fix endless looping between cascade() and internal_add_timer() + +From: "Hildner, Christian" + +commit 26cff4e2aa4d666dc6a120ea34336b5057e3e187 upstream. + +Adding two (or more) timers with large values for "expires" (they have +to reside within tv5 in the same list) leads to endless looping +between cascade() and internal_add_timer() in case CONFIG_BASE_SMALL +is one and jiffies are crossing the value 1 << 18. The bug was +introduced between 2.6.11 and 2.6.12 (and survived for quite some +time). + +This patch ensures that when cascade() is called timers within tv5 are +not added endlessly to their own list again, instead they are added to +the next lower tv level tv4 (as expected). + +Signed-off-by: Christian Hildner +Reviewed-by: Jan Kiszka +Link: http://lkml.kernel.org/r/98673C87CB31274881CFFE0B65ECC87B0F5FC1963E@DEFTHW99EA4MSX.ww902.siemens.net +Signed-off-by: Thomas Gleixner +Signed-off-by: Greg Kroah-Hartman + +--- + kernel/timer.c | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +--- a/kernel/timer.c ++++ b/kernel/timer.c +@@ -63,6 +63,7 @@ EXPORT_SYMBOL(jiffies_64); + #define TVR_SIZE (1 << TVR_BITS) + #define TVN_MASK (TVN_SIZE - 1) + #define TVR_MASK (TVR_SIZE - 1) ++#define MAX_TVAL ((unsigned long)((1ULL << (TVR_BITS + 4*TVN_BITS)) - 1)) + + struct tvec { + struct list_head vec[TVN_SIZE]; +@@ -356,11 +357,12 @@ static void internal_add_timer(struct tv + vec = base->tv1.vec + (base->timer_jiffies & TVR_MASK); + } else { + int i; +- /* If the timeout is larger than 0xffffffff on 64-bit +- * architectures then we use the maximum timeout: ++ /* If the timeout is larger than MAX_TVAL (on 64-bit ++ * architectures or with CONFIG_BASE_SMALL=1) then we ++ * use the maximum timeout. + */ +- if (idx > 0xffffffffUL) { +- idx = 0xffffffffUL; ++ if (idx > MAX_TVAL) { ++ idx = MAX_TVAL; + expires = idx + base->timer_jiffies; + } + i = (expires >> (TVR_BITS + 3 * TVN_BITS)) & TVN_MASK; diff --git a/queue-3.0/viafb-don-t-touch-clock-state-on-olpc-xo-1.5.patch b/queue-3.0/viafb-don-t-touch-clock-state-on-olpc-xo-1.5.patch new file mode 100644 index 00000000000..cbc18303562 --- /dev/null +++ b/queue-3.0/viafb-don-t-touch-clock-state-on-olpc-xo-1.5.patch @@ -0,0 +1,71 @@ +From 012a1211845eab69a5488d59eb87d24cc518c627 Mon Sep 17 00:00:00 2001 +From: Daniel Drake +Date: Tue, 4 Sep 2012 11:45:32 -0400 +Subject: viafb: don't touch clock state on OLPC XO-1.5 + +From: Daniel Drake + +commit 012a1211845eab69a5488d59eb87d24cc518c627 upstream. + +As detailed in the thread titled "viafb PLL/clock tweaking causes XO-1.5 +instability," enabling or disabling the IGA1/IGA2 clocks causes occasional +stability problems during suspend/resume cycles on this platform. + +This is rather odd, as the documentation suggests that clocks have two +states (on/off) and the default (stable) configuration is configured to +enable the clock only when it is needed. However, explicitly enabling *or* +disabling the clock triggers this system instability, suggesting that there +is a 3rd state at play here. + +Leaving the clock enable/disable registers alone solves this problem. +This fixes spurious reboots during suspend/resume behaviour introduced by +commit b692a63a. + +Signed-off-by: Daniel Drake +Signed-off-by: Florian Tobias Schandinat +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/video/via/via_clock.c | 19 +++++++++++++++++++ + 1 file changed, 19 insertions(+) + +--- a/drivers/video/via/via_clock.c ++++ b/drivers/video/via/via_clock.c +@@ -25,6 +25,7 @@ + + #include + #include ++#include + #include "via_clock.h" + #include "global.h" + #include "debug.h" +@@ -289,6 +290,10 @@ static void dummy_set_pll(struct via_pll + printk(KERN_INFO "Using undocumented set PLL.\n%s", via_slap); + } + ++static void noop_set_clock_state(u8 state) ++{ ++} ++ + void via_clock_init(struct via_clock *clock, int gfx_chip) + { + switch (gfx_chip) { +@@ -346,4 +351,18 @@ void via_clock_init(struct via_clock *cl + break; + + } ++ ++ if (machine_is_olpc()) { ++ /* The OLPC XO-1.5 cannot suspend/resume reliably if the ++ * IGA1/IGA2 clocks are set as on or off (memory rot ++ * occasionally happens during suspend under such ++ * configurations). ++ * ++ * The only known stable scenario is to leave this bits as-is, ++ * which in their default states are documented to enable the ++ * clock only when it is needed. ++ */ ++ clock->set_primary_clock_state = noop_set_clock_state; ++ clock->set_secondary_clock_state = noop_set_clock_state; ++ } + } diff --git a/queue-3.0/video-udlfb-fix-line-counting-in-fb_write.patch b/queue-3.0/video-udlfb-fix-line-counting-in-fb_write.patch new file mode 100644 index 00000000000..95818bb9a81 --- /dev/null +++ b/queue-3.0/video-udlfb-fix-line-counting-in-fb_write.patch @@ -0,0 +1,33 @@ +From b8c4321f3d194469007f5f5f2b34ec278c264a04 Mon Sep 17 00:00:00 2001 +From: Alexander Holler +Date: Tue, 14 Aug 2012 09:11:09 +0200 +Subject: video/udlfb: fix line counting in fb_write + +From: Alexander Holler + +commit b8c4321f3d194469007f5f5f2b34ec278c264a04 upstream. + +Line 0 and 1 were both written to line 0 (on the display) and all subsequent +lines had an offset of -1. The result was that the last line on the display +was never overwritten by writes to /dev/fbN. + +Signed-off-by: Alexander Holler +Acked-by: Bernie Thompson +Signed-off-by: Florian Tobias Schandinat +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/video/udlfb.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/video/udlfb.c ++++ b/drivers/video/udlfb.c +@@ -613,7 +613,7 @@ static ssize_t dlfb_ops_write(struct fb_ + result = fb_sys_write(info, buf, count, ppos); + + if (result > 0) { +- int start = max((int)(offset / info->fix.line_length) - 1, 0); ++ int start = max((int)(offset / info->fix.line_length), 0); + int lines = min((u32)((result / info->fix.line_length) + 1), + (u32)info->var.yres); +