x86, hwmon: Fix unsafe smp_processor_id() in thermal_throttle_add_dev
authorSergey Senozhatsky <sergey.senozhatsky@gmail.com>
Fri, 20 Aug 2010 07:36:34 +0000 (10:36 +0300)
committerH. Peter Anvin <hpa@zytor.com>
Sat, 21 Aug 2010 02:56:00 +0000 (19:56 -0700)
commit51e3c1b558b31b11bf5fc66d3c6f5adacf3573f7
tree546a9fb1ce564927e8a3e7929333fc477defbe37
parent36423a5ed5e4ea95ceedb68fad52965033e11639
x86, hwmon: Fix unsafe smp_processor_id() in thermal_throttle_add_dev

Fix BUG: using smp_processor_id() in preemptible thermal_throttle_add_dev.
We know the cpu number when calling thermal_throttle_add_dev, so we can
remove smp_processor_id call in thermal_throttle_add_dev by supplying
the cpu number as argument.

This should resolve kernel bugzilla 16615/16629.

Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
LKML-Reference: <20100820073634.GB5209@swordfish.minsk.epam.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Joerg Roedel <Joerg.Roedel@amd.com>
Cc: Maciej Rutecki <maciej.rutecki@gmail.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
arch/x86/kernel/cpu/mcheck/therm_throt.c