summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorVitaly Kuznetsov <vkuznets@redhat.com>2016-08-24 23:23:12 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-08-31 11:05:41 (GMT)
commiteece30b9f0046cee810a2c7caa2247f3f8dc85e2 (patch)
treede5b5e4b2ba7114d8caf2f2242f82643d3401618 /tools
parenta132c54cbcb8c239a64370b9cd9468908398bc6e (diff)
downloadlinux-eece30b9f0046cee810a2c7caa2247f3f8dc85e2.tar.xz
Drivers: hv: balloon: replace ha_region_mutex with spinlock
lockdep reports possible circular locking dependency when udev is used for memory onlining: systemd-udevd/3996 is trying to acquire lock: ((memory_chain).rwsem){++++.+}, at: [<ffffffff810d137e>] __blocking_notifier_call_chain+0x4e/0xc0 but task is already holding lock: (&dm_device.ha_region_mutex){+.+.+.}, at: [<ffffffffa015382e>] hv_memory_notifier+0x5e/0xc0 [hv_balloon] ... which is probably a false positive because we take and release ha_region_mutex from memory notifier chain depending on the arg. No real deadlocks were reported so far (though I'm not really sure about preemptible kernels...) but we don't really need to hold the mutex for so long. We use it to protect ha_region_list (and its members) and the num_pages_onlined counter. None of these operations require us to sleep and nothing is slow, switch to using spinlock with interrupts disabled. While on it, replace list_for_each -> list_for_each_entry as we actually need entries in all these cases, drop meaningless list_empty() checks. Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions