Commit a7b2451
drm/amdkfd: Fix circular lock in nocpsch path
Calling free_mqd inside of destroy_queue_nocpsch_locked can cause a
circular lock. destroy_queue_nocpsch_locked is called under a DQM lock,
which is taken in MMU notifiers, potentially in FS reclaim context.
Taking another lock, which is BO reservation lock from free_mqd, while
causing an FS reclaim inside the DQM lock creates a problematic circular
lock dependency. Therefore move free_mqd out of
destroy_queue_nocpsch_locked and call it after unlocking DQM.
Signed-off-by: Amber Lin <Amber.Lin@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>1 parent d760895 commit a7b2451
1 file changed
Lines changed: 13 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
486 | 486 | | |
487 | 487 | | |
488 | 488 | | |
489 | | - | |
490 | | - | |
491 | | - | |
492 | 489 | | |
493 | 490 | | |
494 | 491 | | |
| |||
523 | 520 | | |
524 | 521 | | |
525 | 522 | | |
| 523 | + | |
| 524 | + | |
526 | 525 | | |
527 | 526 | | |
528 | 527 | | |
| |||
540 | 539 | | |
541 | 540 | | |
542 | 541 | | |
| 542 | + | |
| 543 | + | |
543 | 544 | | |
544 | 545 | | |
545 | 546 | | |
| |||
1629 | 1630 | | |
1630 | 1631 | | |
1631 | 1632 | | |
1632 | | - | |
| 1633 | + | |
1633 | 1634 | | |
1634 | 1635 | | |
1635 | 1636 | | |
1636 | 1637 | | |
1637 | 1638 | | |
1638 | 1639 | | |
1639 | 1640 | | |
1640 | | - | |
| 1641 | + | |
| 1642 | + | |
1641 | 1643 | | |
1642 | 1644 | | |
| 1645 | + | |
| 1646 | + | |
| 1647 | + | |
1643 | 1648 | | |
1644 | 1649 | | |
1645 | 1650 | | |
| 1651 | + | |
| 1652 | + | |
| 1653 | + | |
1646 | 1654 | | |
1647 | 1655 | | |
1648 | 1656 | | |
| |||
0 commit comments