Skip to contentSkip to conversation

KVM: MMU: check for present pdptr shadow page in walk_shadow

PATCH Applied Marcelo Tosatti 2 participants 2 messages Dec 9, 2008 – Dec 10, 2008

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

walk_shadow assumes the caller verified validity of the pdptr pointer in question, which is not the case for the invlpg handler.

Fixes oops during Solaris 10 install.

arch/x86/kvm/mmu.c +2 -0
index 863baf7..641c078 100644
@@ -1269,6 +1269,8 @@ static int walk_shadow(struct kvm_shadow_walk *walker,
 	if (level == PT32E_ROOT_LEVEL) {
 		shadow_addr = vcpu->arch.mmu.pae_root[(addr >> 30) & 3];
 		shadow_addr &= PT64_BASE_ADDR_MASK;
+		if (!shadow_addr)
+			return 1;
 		--level;
 	}
 
Applied
#1 lore raw
Quoted 5 lines · Marcelo Tosatti

walk_shadow assumes the caller verified validity of the pdptr pointer in question, which is not the case for the invlpg handler.

Fixes oops during Solaris 10 install.

Applied, thanks.

Signature · 1 line
error compiling committee.c: too many arguments to function