Alexey Kardashevskiy
2708da3dbb
powerpc/iommu: Annotate nested lock for lockdep
...
[ Upstream commit cc7130bf11 ]
The IOMMU table is divided into pools for concurrent mappings and each
pool has a separate spinlock. When taking the ownership of an IOMMU group
to pass through a device to a VM, we lock these spinlocks which triggers
a false negative warning in lockdep (below).
This fixes it by annotating the large pool's spinlock as a nest lock
which makes lockdep not complaining when locking nested locks if
the nest lock is locked already.
===
WARNING: possible recursive locking detected
5.11.0-le_syzkaller_a+fstn1 #100 Not tainted
--------------------------------------------
qemu-system-ppc/4129 is trying to acquire lock:
c0000000119bddb0 (&(p->lock)/1){....}-{2:2}, at: iommu_take_ownership+0xac/0x1e0
but task is already holding lock:
c0000000119bdd30 (&(p->lock)/1){....}-{2:2}, at: iommu_take_ownership+0xac/0x1e0
other info that might help us debug this:
Possible unsafe locking scenario:
CPU0
----
lock(&(p->lock)/1);
lock(&(p->lock)/1);
===
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru >
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au >
Link: https://lore.kernel.org/r/20210301063653.51003-1-aik@ozlabs.ru
Signed-off-by: Sasha Levin <sashal@kernel.org >
2021-05-22 10:59:42 +02:00
..
2019-01-13 09:51:05 +01:00
2019-12-17 20:35:40 +01:00
2019-12-17 20:35:40 +01:00
2008-10-07 14:26:18 +11:00
2018-06-03 21:19:40 +10:00
2019-12-17 20:35:40 +01:00
2017-11-02 11:10:55 +01:00
2018-05-25 12:04:44 +10:00
2020-01-27 14:50:55 +01:00
2020-01-27 14:50:55 +01:00
2017-11-02 11:10:55 +01:00
2018-07-30 22:48:17 +10:00
2010-10-13 08:47:09 -04:00
2018-03-24 00:38:51 +11:00
2007-04-24 21:31:49 +10:00
2020-09-03 11:24:16 +02:00
2011-07-12 13:16:58 +03:00
2020-03-11 14:15:12 +01:00
2016-12-24 11:46:01 -08:00
2018-07-30 22:47:53 +10:00
2020-01-09 10:19:08 +01:00
2020-09-23 12:11:02 +02:00
2018-01-15 09:35:39 +01:00
2018-07-30 15:58:01 -05:00
2020-06-22 09:05:29 +02:00
2018-03-27 23:44:58 +11:00
2017-09-21 14:56:00 +10:00
2020-02-24 08:34:36 +01:00
2018-03-27 23:44:58 +11:00
2019-12-01 09:16:18 +01:00
2018-01-27 20:02:52 +11:00
2021-05-22 10:59:20 +02:00
2019-03-23 20:10:07 +01:00
2019-12-01 09:17:46 +01:00
2016-08-07 23:50:09 -04:00
2014-06-10 18:54:22 -07:00
2019-04-03 06:26:20 +02:00
2020-11-22 10:02:26 +01:00
2019-02-12 19:47:16 +01:00
2011-10-31 19:30:41 -04:00
2018-07-30 22:48:17 +10:00
2017-11-02 11:10:55 +01:00
2021-03-04 09:39:47 +01:00
2018-07-30 22:48:17 +10:00
2018-07-30 22:48:13 +10:00
2016-08-07 23:50:09 -04:00
2020-12-30 11:25:51 +01:00
2019-04-03 06:26:20 +02:00
2019-04-03 06:26:20 +02:00
2018-06-26 09:07:55 +02:00
2018-07-30 22:48:17 +10:00
2018-07-24 22:03:14 +10:00
2020-04-17 10:48:53 +02:00
2018-07-30 22:48:17 +10:00
2018-08-14 15:36:02 +10:00
2013-07-01 11:10:35 +10:00
2016-12-20 09:48:44 -08:00
2017-08-23 22:27:04 +10:00
2013-08-14 14:58:08 +10:00
2018-04-05 14:59:26 +10:00
2021-05-22 10:59:42 +02:00
2019-12-31 16:36:32 +01:00
2017-08-23 22:27:04 +10:00
2019-06-04 08:02:34 +02:00
2018-04-13 17:10:28 -07:00
2020-01-27 14:50:00 +01:00
2018-06-21 12:33:19 +02:00
2020-04-17 10:48:53 +02:00
2018-07-30 22:48:16 +10:00
2019-05-08 07:21:50 +02:00
2018-07-30 22:48:17 +10:00
2018-12-19 19:19:52 +01:00
2012-01-12 20:13:03 -08:00
2018-05-10 23:25:08 +10:00
2018-08-10 22:12:36 +10:00
2020-06-25 15:32:51 +02:00
2020-04-17 10:48:54 +02:00
2020-01-27 14:51:14 +01:00
2019-10-11 18:20:49 +02:00
2018-07-30 22:48:17 +10:00
2019-12-17 20:35:16 +01:00
2018-06-04 00:39:17 +10:00
2018-05-25 12:04:38 +10:00
2018-11-21 09:19:08 +01:00
2018-11-13 11:08:50 -08:00
2017-12-11 13:03:35 +11:00
2018-12-19 19:19:52 +01:00
2019-06-11 12:20:52 +02:00
2017-08-23 22:27:04 +10:00
2018-01-19 22:37:01 +11:00
2017-11-12 23:51:41 +11:00
2018-03-31 09:09:36 +11:00
2018-06-25 23:21:13 +09:00
2018-06-25 23:21:13 +09:00
2020-02-24 08:34:50 +01:00
2020-05-10 10:30:06 +02:00
2021-03-17 16:43:45 +01:00
2017-12-18 23:05:52 -06:00
2012-02-29 17:15:08 -05:00
2013-02-03 18:16:10 -05:00
2018-07-30 22:48:16 +10:00
2018-01-22 05:48:33 +11:00
2019-12-01 09:17:01 +01:00
2018-04-04 16:59:50 +10:00
2020-01-27 14:49:52 +01:00
2017-11-02 11:10:55 +01:00
2021-05-22 10:59:35 +02:00
2016-12-24 11:46:01 -08:00
2019-03-23 20:10:07 +01:00
2013-07-01 11:10:34 +10:00
2017-08-31 14:26:47 +10:00
2018-01-22 05:48:33 +11:00
2017-08-31 14:26:40 +10:00
2018-06-07 10:23:33 -07:00
2018-06-03 20:43:33 +10:00
2020-12-30 11:26:12 +01:00
2019-04-20 09:16:01 +02:00
2020-01-04 19:12:56 +01:00
2018-08-10 22:12:38 +10:00
2020-11-22 10:02:26 +01:00
2020-12-30 11:25:51 +01:00
2018-05-25 12:04:43 +10:00
2020-02-28 16:38:48 +01:00
2020-04-17 10:48:53 +02:00
2020-02-28 16:38:48 +01:00
2018-05-10 23:25:13 +10:00
2017-11-02 11:10:55 +01:00
2021-05-22 10:59:41 +02:00
2018-06-19 23:03:50 +10:00
2014-10-09 22:26:04 -04:00
2019-07-26 09:14:29 +02:00
2017-03-02 08:42:30 +01:00
2018-07-30 22:48:17 +10:00
2017-11-02 11:10:55 +01:00
2017-03-20 19:02:49 +11:00
2018-05-10 23:25:15 +10:00
2018-06-25 23:21:13 +09:00
2020-11-05 11:08:51 +01:00
2018-05-10 23:25:14 +10:00
2018-05-10 23:25:16 +10:00
2018-05-10 23:25:14 +10:00
2020-10-30 10:38:19 +01:00
2020-04-29 16:31:14 +02:00
2018-09-25 22:51:32 +10:00
2021-03-17 16:43:46 +01:00
2014-11-12 13:47:20 +11:00
2015-04-07 17:15:13 +10:00
2017-08-24 16:19:21 +10:00
2020-08-19 08:14:57 +02:00
2018-05-25 12:04:46 +10:00
2018-07-30 22:48:16 +10:00
2021-03-24 11:07:31 +01:00
2019-05-31 06:46:12 -07:00