mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
6b7881f3af
store_powersave_bias() acquires the hotplug lock and the dbs_mutex lock, but does so in the wrong order. Deadlocks like the following can result. Thread A: get_online_cpus+0x3c/0x5c <- acquires 'cpu_hotplug.lock' store_powersave_bias+0x80/0x3f4 <- acquires 'dbs_mutex' kobj_attr_store+0x14/0x20 sysfs_write_file+0x108/0x13c vfs_write+0xb0/0x128 sys_write+0x38/0x64 Thread B: cpufreq_governor_dbs+0x7c/0x55c <- acquires 'dbs_mutex' __cpufreq_governor+0x90/0xe0 __cpufreq_set_policy+0x1b0/0x258 cpufreq_add_dev_interface+0x2cc/0x334 cpufreq_add_dev+0x514/0x580 cpufreq_cpu_callback+0x88/0x9c notifier_call_chain+0x38/0x68 __cpu_notify+0x28/0x40 _cpu_up+0xe4/0x118 <- acquires 'cpu_hotplug.lock' cpu_up+0x64/0x80 store_online+0x48/0x78 dev_attr_store+0x18/0x24 sysfs_write_file+0x108/0x13c vfs_write+0xb0/0x128 sys_write+0x38/0x64 Fix this by flipping the order in which the locks are acquired and released in store_powersave_bias so that it is the same as in the hotplug path. Change-Id: Idc59fb29d60b8f7fceb8ed0f2bb9eff4670abda7 Signed-off-by: Matt Wagantall <mattw@codeaurora.org> |
||
---|---|---|
.. | ||
accessibility | ||
acpi | ||
amba | ||
ata | ||
atm | ||
auxdisplay | ||
base | ||
bcma | ||
block | ||
bluetooth | ||
cdrom | ||
char | ||
clk | ||
clocksource | ||
connector | ||
coresight | ||
cpufreq | ||
cpuidle | ||
crypto | ||
dca | ||
devfreq | ||
dio | ||
dma | ||
edac | ||
eisa | ||
firewire | ||
firmware | ||
gpio | ||
gpu | ||
gud | ||
hid | ||
hsi | ||
hv | ||
hwmon | ||
hwspinlock | ||
i2c | ||
ide | ||
idle | ||
ieee802154 | ||
infiniband | ||
input | ||
iommu | ||
isdn | ||
leds | ||
lguest | ||
macintosh | ||
mca | ||
md | ||
media | ||
memstick | ||
message | ||
mfd | ||
misc | ||
mmc | ||
mtd | ||
net | ||
nfc | ||
nubus | ||
of | ||
oprofile | ||
parisc | ||
parport | ||
pci | ||
pcmcia | ||
pinctrl | ||
platform | ||
pnp | ||
power | ||
pps | ||
ps3 | ||
ptp | ||
rapidio | ||
regulator | ||
remoteproc | ||
rpmsg | ||
rtc | ||
s390 | ||
sbus | ||
scsi | ||
sfi | ||
sh | ||
slimbus | ||
sn | ||
spi | ||
spmi | ||
ssb | ||
staging | ||
switch | ||
target | ||
tc | ||
thermal | ||
tty | ||
uio | ||
usb | ||
uwb | ||
vhost | ||
video | ||
virt | ||
virtio | ||
vlynq | ||
w1 | ||
watchdog | ||
xen | ||
zorro | ||
Kconfig | ||
Makefile |