Commit 557bc4f
regulator: push allocations in create_regulator() outside of lock
commit 87fe29b upstream.
Move all allocations outside of the regulator_lock()ed section.
======================================================
WARNING: possible circular locking dependency detected
5.7.13+ torvalds#535 Not tainted
------------------------------------------------------
f2fs_discard-179:7/702 is trying to acquire lock:
c0e5d920 (regulator_list_mutex){+.+.}-{3:3}, at: regulator_lock_dependent+0x54/0x2c0
but task is already holding lock:
cb95b080 (&dcc->cmd_lock){+.+.}-{3:3}, at: __issue_discard_cmd+0xec/0x5f8
which lock already depends on the new lock.
the existing dependency chain (in reverse order) is:
[...]
-> #3 (fs_reclaim){+.+.}-{0:0}:
fs_reclaim_acquire.part.11+0x40/0x50
fs_reclaim_acquire+0x24/0x28
__kmalloc_track_caller+0x54/0x218
kstrdup+0x40/0x5c
create_regulator+0xf4/0x368
regulator_resolve_supply+0x1a0/0x200
regulator_register+0x9c8/0x163c
[...]
other info that might help us debug this:
Chain exists of:
regulator_list_mutex --> &sit_i->sentry_lock --> &dcc->cmd_lock
[...]
Fixes: f8702f9 ("regulator: core: Use ww_mutex for regulators locking")
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/6eebc99b2474f4ffaa0405b15178ece0e7e4f608.1597195321.git.mirq-linux@rere.qmqm.pl
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent 96ccd5a commit 557bc4f
1 file changed
+28
-25
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1579 | 1579 | | |
1580 | 1580 | | |
1581 | 1581 | | |
1582 | | - | |
1583 | | - | |
| 1582 | + | |
| 1583 | + | |
| 1584 | + | |
| 1585 | + | |
| 1586 | + | |
| 1587 | + | |
| 1588 | + | |
| 1589 | + | |
| 1590 | + | |
| 1591 | + | |
| 1592 | + | |
| 1593 | + | |
| 1594 | + | |
| 1595 | + | |
| 1596 | + | |
| 1597 | + | |
| 1598 | + | |
| 1599 | + | |
| 1600 | + | |
1584 | 1601 | | |
1585 | 1602 | | |
1586 | | - | |
| 1603 | + | |
| 1604 | + | |
1587 | 1605 | | |
| 1606 | + | |
1588 | 1607 | | |
1589 | | - | |
1590 | 1608 | | |
| 1609 | + | |
| 1610 | + | |
| 1611 | + | |
1591 | 1612 | | |
| 1613 | + | |
1592 | 1614 | | |
1593 | 1615 | | |
1594 | 1616 | | |
1595 | 1617 | | |
1596 | 1618 | | |
1597 | | - | |
1598 | | - | |
1599 | | - | |
1600 | | - | |
1601 | | - | |
1602 | | - | |
1603 | | - | |
1604 | | - | |
1605 | | - | |
1606 | 1619 | | |
1607 | | - | |
| 1620 | + | |
1608 | 1621 | | |
1609 | 1622 | | |
1610 | 1623 | | |
1611 | 1624 | | |
1612 | 1625 | | |
1613 | | - | |
1614 | | - | |
1615 | | - | |
1616 | | - | |
1617 | 1626 | | |
1618 | 1627 | | |
1619 | | - | |
| 1628 | + | |
1620 | 1629 | | |
1621 | 1630 | | |
1622 | 1631 | | |
| |||
1641 | 1650 | | |
1642 | 1651 | | |
1643 | 1652 | | |
1644 | | - | |
1645 | 1653 | | |
1646 | | - | |
1647 | | - | |
1648 | | - | |
1649 | | - | |
1650 | | - | |
1651 | 1654 | | |
1652 | 1655 | | |
1653 | 1656 | | |
| |||
0 commit comments