Commit 501cfe0
committed
KVM: SEV: unify cgroup cleanup code for svm_vm_migrate_from
Use the same cleanup code independent of whether the cgroup to be
uncharged and unref'd is the source or the destination cgroup. Use a
bool to track whether the destination cgroup has been charged, which also
fixes a bug in the error case: the destination cgroup must be uncharged
only if it does not match the source.
Fixes: b566393 ("KVM: SEV: Add support for SEV intra host migration")
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>1 parent 3e067fd commit 501cfe0
1 file changed
Lines changed: 11 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1614 | 1614 | | |
1615 | 1615 | | |
1616 | 1616 | | |
1617 | | - | |
1618 | | - | |
1619 | | - | |
1620 | | - | |
1621 | | - | |
1622 | | - | |
1623 | 1617 | | |
1624 | 1618 | | |
1625 | 1619 | | |
| |||
1667 | 1661 | | |
1668 | 1662 | | |
1669 | 1663 | | |
1670 | | - | |
| 1664 | + | |
1671 | 1665 | | |
1672 | 1666 | | |
| 1667 | + | |
1673 | 1668 | | |
1674 | 1669 | | |
1675 | 1670 | | |
| |||
1699 | 1694 | | |
1700 | 1695 | | |
1701 | 1696 | | |
| 1697 | + | |
1702 | 1698 | | |
1703 | 1699 | | |
1704 | 1700 | | |
1705 | | - | |
| 1701 | + | |
| 1702 | + | |
1706 | 1703 | | |
1707 | 1704 | | |
1708 | 1705 | | |
| |||
1719 | 1716 | | |
1720 | 1717 | | |
1721 | 1718 | | |
| 1719 | + | |
1722 | 1720 | | |
1723 | 1721 | | |
1724 | 1722 | | |
1725 | 1723 | | |
1726 | 1724 | | |
1727 | 1725 | | |
1728 | 1726 | | |
1729 | | - | |
1730 | | - | |
1731 | | - | |
1732 | | - | |
1733 | | - | |
1734 | | - | |
| 1727 | + | |
| 1728 | + | |
| 1729 | + | |
| 1730 | + | |
| 1731 | + | |
1735 | 1732 | | |
1736 | 1733 | | |
1737 | 1734 | | |
| |||
0 commit comments