Revision 1a3f2fd7fc4e8f24510830e265de2ffb8e3300d2 authored by Lu Baolu on 27 September 2020, 06:24:28 UTC, committed by Joerg Roedel on 01 October 2020, 12:54:17 UTC
Lock(&iommu->lock) without disabling irq causes lockdep warnings.

[   12.703950] ========================================================
[   12.703962] WARNING: possible irq lock inversion dependency detected
[   12.703975] 5.9.0-rc6+ #659 Not tainted
[   12.703983] --------------------------------------------------------
[   12.703995] systemd-udevd/284 just changed the state of lock:
[   12.704007] ffffffffbd6ff4d8 (device_domain_lock){..-.}-{2:2}, at:
               iommu_flush_dev_iotlb.part.57+0x2e/0x90
[   12.704031] but this lock took another, SOFTIRQ-unsafe lock in the past:
[   12.704043]  (&iommu->lock){+.+.}-{2:2}
[   12.704045]

               and interrupts could create inverse lock ordering between
               them.

[   12.704073]
               other info that might help us debug this:
[   12.704085]  Possible interrupt unsafe locking scenario:

[   12.704097]        CPU0                    CPU1
[   12.704106]        ----                    ----
[   12.704115]   lock(&iommu->lock);
[   12.704123]                                local_irq_disable();
[   12.704134]                                lock(device_domain_lock);
[   12.704146]                                lock(&iommu->lock);
[   12.704158]   <Interrupt>
[   12.704164]     lock(device_domain_lock);
[   12.704174]
                *** DEADLOCK ***

Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Link: https://lore.kernel.org/r/20200927062428.13713-1-baolu.lu@linux.intel.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
1 parent 0bbe4ce
History
File Mode Size
Makefile -rw-r--r-- 1.4 KB
common.c -rw-r--r-- 26.2 KB
generic.c -rw-r--r-- 9.5 KB
generic_report.c -rw-r--r-- 4.5 KB
init.c -rw-r--r-- 11.1 KB
kasan.h -rw-r--r-- 9.6 KB
quarantine.c -rw-r--r-- 8.8 KB
report.c -rw-r--r-- 15.1 KB
tags.c -rw-r--r-- 5.6 KB
tags_report.c -rw-r--r-- 2.4 KB

back to top