Denis Kirjanov
2c1dd423a5
cpufreq: powernv: Disable preemption while checking CPU throttling state
commit 8a10c06a20 upstream.
With preemption turned on we can read incorrect throttling state
while being switched to CPU on a different chip.
BUG: using smp_processor_id() in preemptible [00000000] code: cat/7343
caller is .powernv_cpufreq_throttle_check+0x2c/0x710
CPU: 13 PID: 7343 Comm: cat Not tainted 4.8.0-rc5-dirty #1
Call Trace:
[c0000007d25b75b0] [c000000000971378] .dump_stack+0xe4/0x150 (unreliable)
[c0000007d25b7640] [c0000000005162e4] .check_preemption_disabled+0x134/0x150
[c0000007d25b76e0] [c0000000007b63ac] .powernv_cpufreq_throttle_check+0x2c/0x710
[c0000007d25b7790] [c0000000007b6d18] .powernv_cpufreq_target_index+0x288/0x360
[c0000007d25b7870] [c0000000007acee4] .__cpufreq_driver_target+0x394/0x8c0
[c0000007d25b7920] [c0000000007b22ac] .cpufreq_set+0x7c/0xd0
[c0000007d25b79b0] [c0000000007adf50] .store_scaling_setspeed+0x80/0xc0
[c0000007d25b7a40] [c0000000007ae270] .store+0xa0/0x100
[c0000007d25b7ae0] [c0000000003566e8] .sysfs_kf_write+0x88/0xb0
[c0000007d25b7b70] [c0000000003553b8] .kernfs_fop_write+0x178/0x260
[c0000007d25b7c10] [c0000000002ac3cc] .__vfs_write+0x3c/0x1c0
[c0000007d25b7cf0] [c0000000002ad584] .vfs_write+0xc4/0x230
[c0000007d25b7d90] [c0000000002aeef8] .SyS_write+0x58/0x100
[c0000007d25b7e30] [c00000000000bfec] system_call+0x38/0xfc
Fixes: 09a972d162 (cpufreq: powernv: Report cpu frequency throttling)
Reviewed-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com>
Signed-off-by: Denis Kirjanov <kda@linux-powerpc.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-19 20:17:22 +01:00
..
2015-10-08 21:47:13 +02:00
2015-09-15 02:03:16 +02:00
2015-11-02 01:58:27 +01:00
2015-09-15 02:03:16 +02:00
2015-11-23 22:21:18 +01:00
2015-09-26 02:59:38 +02:00
2016-03-03 15:07:25 -08:00
2015-09-26 02:59:38 +02:00
2015-10-28 09:20:04 +01:00
2016-09-15 08:27:54 +02:00
2015-09-15 02:03:16 +02:00
2015-12-02 23:50:33 +01:00
2015-09-15 02:03:16 +02:00
2015-11-02 00:54:37 +01:00
2015-09-25 23:29:35 +02:00
2016-10-28 03:01:26 -04:00
2015-12-12 02:25:56 +01:00
2015-11-19 00:20:42 +01:00
2015-11-10 15:00:03 -08:00
2015-09-15 02:03:16 +02:00
2017-01-19 20:17:22 +01:00
2016-03-03 15:07:25 -08:00
2015-11-27 10:10:32 +09:00
2015-11-05 22:50:48 +01:00
2015-12-24 02:11:37 +01:00
2015-09-26 03:00:57 +02:00