Skip to contentSkip to conversation

KVM: mmu.c, change BUG_ON() to WARN_ON()

PATCH In review Ingo Molnar 2 participants 3 messages Mar 12, 2007 1 message not in the archive KVM

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 KVM: mmu.c, change BUG_ON() to WARN_ON()

Subject: [patch] KVM: mmu.c, change BUG_ON() to WARN_ON()
From: Ingo Molnar <[email protected]>

this triggered for me with the cr3 cache - do not crash the host, just warn about the condition. (Given that there is code after the BUG_ON() this was the anticipated behavior i suspect.)

drivers/kvm/mmu.c +1 -1
Index: linux/drivers/kvm/mmu.c
===================================================================
@@ -514,7 +514,7 @@ static void mmu_page_remove_parent_pte(s
 	int i;
 
 	if (!page->multimapped) {
-		BUG_ON(page->parent_pte != parent_pte);
+		WARN_ON(page->parent_pte != parent_pte);
 		page->parent_pte = NULL;
 		return;
 	}

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw
Quoted 3 lines

(Given that there is code after the BUG_ON() this was the anticipated behavior i suspect.)

ignore this sentence - it wasnt a BUG_ON(1).

Ingo

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

#3 lore raw
In reply to a message not in the archive
Quoted 15 lines · Ingo Molnar

Subject: [patch] KVM: mmu.c, change BUG_ON() to WARN_ON()
From: Ingo Molnar <[email protected]>

this triggered for me with the cr3 cache - do not crash the host, just warn about the condition. (Given that there is code after the BUG_ON() this was the anticipated behavior i suspect.)

Index: linux/drivers/kvm/mmu.c
===================================================================

drivers/kvm/mmu.c static void mmu_page_remove_parent_pte(s · line 520

Quoted 8 lines
drivers/kvm/mmu.c +1 -1
@@ -514,7 +514,7 @@ static void mmu_page_remove_parent_pte(s
 	int i;
 
 	if (!page->multimapped) {
-		BUG_ON(page->parent_pte != parent_pte);
+		WARN_ON(page->parent_pte != parent_pte);
 		page->parent_pte = NULL;
 		return;
 	}

Host memory is corrupted, I think we should at a minimum kill the guest to contain the damage.

Signature · 8 lines
error compiling committee.c: too many arguments to function


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV