1. 16 Oct, 2009 4 commits
    • Darrick J. Wong's avatar
      KVM: Prevent kvm_init from corrupting debugfs structures · 0ea4ed8e
      Darrick J. Wong authored
      I'm seeing an oops condition when kvm-intel and kvm-amd are modprobe'd
      during boot (say on an Intel system) and then rmmod'd:
      
         # modprobe kvm-intel
           kvm_init()
           kvm_init_debug()
           kvm_arch_init()  <-- stores debugfs dentries internally
           (success, etc)
      
         # modprobe kvm-amd
           kvm_init()
           kvm_init_debug() <-- second initialization clobbers kvm's
                                internal pointers to dentries
           kvm_arch_init()
           kvm_exit_debug() <-- and frees them
      
         # rmmod kvm-intel
           kvm_exit()
           kvm_exit_debug() <-- double free of debugfs files!
      
           *BOOM*
      
      If execution gets to the end of kvm_init(), then the calling module has been
      established as the kvm provider.  Move the debugfs initialization to the end of
      the function, and remove the now-unnecessary call to kvm_exit_debug() from the
      error path.  That way we avoid trampling on the debugfs entries and freeing
      them twice.
      
      Cc: stable@kernel.org
      Signed-off-by: default avatarDarrick J. Wong <djwong@us.ibm.com>
      Signed-off-by: default avatarMarcelo Tosatti <mtosatti@redhat.com>
      0ea4ed8e
    • Frederik Deweerdt's avatar
      KVM: MMU: fix pointer cast · 8a8365c5
      Frederik Deweerdt authored
      On a 32 bits compile, commit 3da0dd43
      introduced the following warnings:
      
      arch/x86/kvm/mmu.c: In function ‘kvm_set_pte_rmapp’:
      arch/x86/kvm/mmu.c:770: warning: cast to pointer from integer of different size
      arch/x86/kvm/mmu.c: In function ‘kvm_set_spte_hva’:
      arch/x86/kvm/mmu.c:849: warning: cast from pointer to integer of different size
      
      The following patch uses 'unsigned long' instead of u64 to match the
      pointer size on both arches.
      Signed-off-by: default avatarFrederik Deweerdt <frederik.deweerdt@xprog.eu>
      Signed-off-by: default avatarMarcelo Tosatti <mtosatti@redhat.com>
      8a8365c5
    • Marcelo Tosatti's avatar
      KVM: use proper hrtimer function to retrieve expiration time · ace15464
      Marcelo Tosatti authored
      hrtimer->base can be temporarily NULL due to racing hrtimer_start.
      See switch_hrtimer_base/lock_hrtimer_base.
      
      Use hrtimer_get_remaining which is robust against it.
      
      CC: stable@kernel.org
      Signed-off-by: default avatarMarcelo Tosatti <mtosatti@redhat.com>
      Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
      ace15464
    • Linus Torvalds's avatar
      Linux 2.6.32-rc5 · 012abeea
      Linus Torvalds authored
      012abeea
  2. 15 Oct, 2009 23 commits
  3. 14 Oct, 2009 13 commits