summaryrefslogtreecommitdiff
path: root/drivers/pwm/pwm-tiecap.c
diff options
context:
space:
mode:
authorTakuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>2012-08-20 09:35:39 (GMT)
committerAvi Kivity <avi@redhat.com>2012-08-22 12:27:13 (GMT)
commit35f2d16bb9ace0fb2671b8232839944ad9057c6f (patch)
tree763610b668cb62664b55a838488e96dad829a9b0 /drivers/pwm/pwm-tiecap.c
parente8143ccb6b501f78bb95d9c5ee100d18423008cf (diff)
downloadlinux-fsl-qoriq-35f2d16bb9ace0fb2671b8232839944ad9057c6f.tar.xz
KVM: MMU: Fix mmu_shrink() so that it can free mmu pages as intended
Although the possible race described in commit 85b7059169e128c57a3a8a3e588fb89cb2031da1 KVM: MMU: fix shrinking page from the empty mmu was correct, the real cause of that issue was a more trivial bug of mmu_shrink() introduced by commit 1952639665e92481c34c34c3e2a71bf3e66ba362 KVM: MMU: do not iterate over all VMs in mmu_shrink() Here is the bug: if (kvm->arch.n_used_mmu_pages > 0) { if (!nr_to_scan--) break; continue; } We skip VMs whose n_used_mmu_pages is not zero and try to shrink others: in other words we try to shrink empty ones by mistake. This patch reverses the logic so that mmu_shrink() can free pages from the first VM whose n_used_mmu_pages is not zero. Note that we also add comments explaining the role of nr_to_scan which is not practically important now, hoping this will be improved in the future. Signed-off-by: Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp> Cc: Gleb Natapov <gleb@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'drivers/pwm/pwm-tiecap.c')
0 files changed, 0 insertions, 0 deletions