projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
06e0564
)
KVM: MMU: Fix rmap_write_protect() hugepage iteration bug
author
Marcelo Tosatti
<mtosatti@redhat.com>
Sun, 8 Jun 2008 04:48:53 +0000
(
01:48
-0300)
committer
Avi Kivity
<avi@qumranet.com>
Tue, 24 Jun 2008 09:17:10 +0000
(12:17 +0300)
rmap_next() does not work correctly after rmap_remove(), as it expects
the rmap chains not to change during iteration. Fix (for now) by restarting
iteration from the beginning.
Signed-off-by: Avi Kivity <avi@qumranet.com>
arch/x86/kvm/mmu.c
patch
|
blob
|
blame
|
history
diff --git
a/arch/x86/kvm/mmu.c
b/arch/x86/kvm/mmu.c
index ee3f53098f0c738e59bc1eb3fefe890d3e528eeb..9628091c574d06f3f9dd0c8ce49db662797a0fa9 100644
(file)
--- a/
arch/x86/kvm/mmu.c
+++ b/
arch/x86/kvm/mmu.c
@@
-640,6
+640,7
@@
static void rmap_write_protect(struct kvm *kvm, u64 gfn)
rmap_remove(kvm, spte);
--kvm->stat.lpages;
set_shadow_pte(spte, shadow_trap_nonpresent_pte);
+ spte = NULL;
write_protected = 1;
}
spte = rmap_next(kvm, rmapp, spte);