summaryrefslogtreecommitdiff
path: root/include/uapi/linux/errqueue.h
diff options
context:
space:
mode:
authorRohit Gupta <rohgup@codeaurora.org>2016-05-19 17:42:04 -0700
committerKyle Yan <kyan@codeaurora.org>2016-06-01 15:27:34 -0700
commit7668a3726f0551a59865f7cb3704527fa4080c95 (patch)
tree14513fc2890fc7abe835ff792f6754298507b7c3 /include/uapi/linux/errqueue.h
parent8b2d1771d2a712a4718a5141bedd4fb031b0b91e (diff)
PM / devfreq: memlat: Prevent deadlock with hotplug in start_hwmon
When start_hwmon() runs with another thread trying to hotplug a CPU the two threads can enter a deadlock situation as follows: Thread A (start_hwmon()) Thread B (CPU down) get_online_cpus() | atomic_inc(&cpu_hotplug.refcount) CPU down | mutex_lock(&cpu_add_remove_lock) | cpu_hotplug_begin() waits on cpu_hotplug.refcount to reset register_cpu_notifier() | mutex_lock(&cpu_add_remove_lock) With this change the notifers are registered and unregistered per device rather than having a common notifier block for all the memlat devices and unregistration only happens on stop_hwmon. This makes it possible to move the registration outside the hotplug lock without any race between multiple memlat devices. Change-Id: I6ad561fe4967042e45190aea2c9b7fcfe05bafdd Signed-off-by: Rohit Gupta <rohgup@codeaurora.org>
Diffstat (limited to 'include/uapi/linux/errqueue.h')
0 files changed, 0 insertions, 0 deletions