Skip to content
  1. Sep 18, 2012
    • Michael S. Tsirkin's avatar
      KVM: make processes waiting on vcpu mutex killable · 9fc77441
      Michael S. Tsirkin authored
      
      
      vcpu mutex can be held for unlimited time so
      taking it with mutex_lock on an ioctl is wrong:
      one process could be passed a vcpu fd and
      call this ioctl on the vcpu used by another process,
      it will then be unkillable until the owner exits.
      
      Call mutex_lock_killable instead and return status.
      Note: mutex_lock_interruptible would be even nicer,
      but I am not sure all users are prepared to handle EINTR
      from these ioctls. They might misinterpret it as an error.
      
      Cleanup paths expect a vcpu that can't be used by
      any userspace so this will always succeed - catch bugs
      by calling BUG_ON.
      
      Catch callers that don't check return state by adding
      __must_check.
      
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarMarcelo Tosatti <mtosatti@redhat.com>
      9fc77441
  2. Sep 17, 2012
  3. Sep 13, 2012
  4. Sep 10, 2012
  5. Sep 09, 2012
  6. Sep 06, 2012
  7. Sep 05, 2012
  8. Sep 04, 2012
  9. Aug 31, 2012
  10. Aug 28, 2012