From: Greg Kroah-Hartman Date: Tue, 21 Jul 2015 15:29:37 +0000 (-0700) Subject: 3.14-stable patches X-Git-Tag: v4.0.9~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=783e70f1da3a8cb12edfa91563b8c6902307ce69;p=thirdparty%2Fkernel%2Fstable-queue.git 3.14-stable patches added patches: thermal-step_wise-fix-prevent-from-binary-overflow-when-trend-is-dropping.patch --- diff --git a/queue-3.14/series b/queue-3.14/series index f873d9afccc..e7ee2279471 100644 --- a/queue-3.14/series +++ b/queue-3.14/series @@ -20,3 +20,4 @@ genirq-devres-fix-testing-return-value-of-request_any_context_irq.patch leds-pm-fix-hibernation-on-arm-when-gpio-led-used-with-cpu-led-trigger.patch mtd-fix-avoid-race-condition-when-accessing-mtd-usecount.patch mtd-dc21285-use-raw-spinlock-functions-for-nw_gpio_lock.patch +thermal-step_wise-fix-prevent-from-binary-overflow-when-trend-is-dropping.patch diff --git a/queue-3.14/thermal-step_wise-fix-prevent-from-binary-overflow-when-trend-is-dropping.patch b/queue-3.14/thermal-step_wise-fix-prevent-from-binary-overflow-when-trend-is-dropping.patch new file mode 100644 index 00000000000..de2482f08b8 --- /dev/null +++ b/queue-3.14/thermal-step_wise-fix-prevent-from-binary-overflow-when-trend-is-dropping.patch @@ -0,0 +1,37 @@ +From 26bb0e9a1a938ec98ee07aa76533f1a711fba706 Mon Sep 17 00:00:00 2001 +From: Lukasz Majewski +Date: Wed, 24 Sep 2014 10:27:10 +0200 +Subject: thermal: step_wise: fix: Prevent from binary overflow when trend is dropping + +From: Lukasz Majewski + +commit 26bb0e9a1a938ec98ee07aa76533f1a711fba706 upstream. + +It turns out that some boards can have instance->lower greater than 0 and +when thermal trend is dropping it results with next_target equal to -1. + +Since the next_target is defined as unsigned long it is interpreted as +0xFFFFFFFF and larger than instance->upper. +As a result the next_target is set to instance->upper which ramps up to +maximal cooling device target when the temperature is steadily decreasing. + +Signed-off-by: Lukasz Majewski +Signed-off-by: Zhang Rui +Cc: Mason +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/thermal/step_wise.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/thermal/step_wise.c ++++ b/drivers/thermal/step_wise.c +@@ -76,7 +76,7 @@ static unsigned long get_target_state(st + next_target = instance->upper; + break; + case THERMAL_TREND_DROPPING: +- if (cur_state == instance->lower) { ++ if (cur_state <= instance->lower) { + if (!throttle) + next_target = THERMAL_NO_TARGET; + } else {