cpufreq: Fix a circular lock dependency problem
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest2 patches 1 replyIn review
- v12 patches 4 repliesSuperseded
Changes in v2 from the cover letter
- Remove the retry loop in the store method.
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | cpu/hotplug: Add a cpus_read_trylock() functioninclude/ kernel/ | +8 | 0 replies | |
| 2/2 | cpufreq: Fix a circular lock dependency problemdrivers/ | +6 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH v2 0/2] cpufreq: Fix a circular lock dependency problem
v2:
- Remove the retry loop in the store method.
This patchset works around a circular lock dependency issue in the cpufreq driver reported by lockdep. The two locks involved are the cpu_hotplup_lock and the reference count of a sysfs file.
The cpufreq_register_driver() function uses the lock sequence:
cpus_read_lock --> kn->count
Whereas the cpufreq sysfs store method uses the sequence:
kn->count --> cpus_read_lock
This is not really an issue as a shared lock is used on the cpu_hotplup_lock. However, the lockdep code isn't able to handle shared locking. So one way to work around this is to define a cpus_read_trylock() function and uses it in the store method instead.
Waiman Long (2):
cpu/hotplug: Add a cpus_read_trylock() function
cpufreq: Fix a circular lock dependency problem
drivers/cpufreq/cpufreq.c | 7 ++++++- include/linux/cpu.h | 2 ++ kernel/cpu.c | 6 ++++++ 3 files changed, 14 insertions(+), 1 deletion(-)
Signature · 1 line
1.8.3.1