Skip to content

Commit

Permalink
KVM: PPC: BookE: fix sleep with interrupts disabled
Browse files Browse the repository at this point in the history
It is not legal to call mutex_lock() with interrupts disabled.
This will assert with debug checks enabled.

If there's a real need to disable interrupts here, it could be done
after the mutex is acquired -- but I don't see why it's needed at all.

Signed-off-by: Scott Wood <[email protected]>
Reviewed-by: Christian Ehrhardt <[email protected]>
Signed-off-by: Alexander Graf <[email protected]>
  • Loading branch information
Scott Wood authored and matosatti committed Nov 5, 2010
1 parent f22e2f0 commit bb59e97
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions arch/powerpc/kvm/timing.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ void kvmppc_init_timing_stats(struct kvm_vcpu *vcpu)
int i;

/* pause guest execution to avoid concurrent updates */
local_irq_disable();
mutex_lock(&vcpu->mutex);

vcpu->arch.last_exit_type = 0xDEAD;
Expand All @@ -51,7 +50,6 @@ void kvmppc_init_timing_stats(struct kvm_vcpu *vcpu)
vcpu->arch.timing_last_enter.tv64 = 0;

mutex_unlock(&vcpu->mutex);
local_irq_enable();
}

static void add_exit_timing(struct kvm_vcpu *vcpu, u64 duration, int type)
Expand Down

0 comments on commit bb59e97

Please sign in to comment.