Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0492c371372ef5eac3a952509391dea231b0de89
Commit:     0492c371372ef5eac3a952509391dea231b0de89
Parent:     5a6d41b32a17ca902ef50fdfa170d7f23264bad5
Author:     Zachary Amsden <[EMAIL PROTECTED]>
AuthorDate: Thu Apr 12 19:28:46 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Sat Apr 14 21:48:36 2007 -0700

    Fix VMI relocation processing logic error
    
    Fix logic error in VMI relocation processing.  NOPs would always cause
    a BUG_ON to fire because the != RELOCATION_NONE in the first if clause
    precluding the == VMI_RELOCATION_NOP in the second clause.  Make these
    direct equality tests and just warn for unsupported relocation types
    (which should never happen), falling back to native in that case.
    
    Thanks to Anthony Liguori for noting this!
    
    Signed-off-by: Zachary Amsden <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 arch/i386/kernel/vmi.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/arch/i386/kernel/vmi.c b/arch/i386/kernel/vmi.c
index edc339f..697a70e 100644
--- a/arch/i386/kernel/vmi.c
+++ b/arch/i386/kernel/vmi.c
@@ -712,11 +712,14 @@ static void *vmi_get_function(int vmicall)
 do {                                                           \
        reloc = call_vrom_long_func(vmi_rom, get_reloc,         \
                                    VMI_CALL_##vmicall);        \
-       if (rel->type != VMI_RELOCATION_NONE) {                 \
-               BUG_ON(rel->type != VMI_RELOCATION_CALL_REL);   \
+       if (rel->type == VMI_RELOCATION_CALL_REL)               \
                paravirt_ops.opname = (void *)rel->eip;         \
-       } else if (rel->type == VMI_RELOCATION_NOP)             \
+       else if (rel->type == VMI_RELOCATION_NOP)               \
                paravirt_ops.opname = (void *)vmi_nop;          \
+       else if (rel->type != VMI_RELOCATION_NONE)              \
+               printk(KERN_WARNING "VMI: Unknown relocation "  \
+                                   "type %d for " #vmicall"\n",\
+                                       rel->type);             \
 } while (0)
 
 /*
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to