]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: KVM: fix unbalanced get_cpu() in access_dcsw
authorMarc Zyngier <marc.zyngier@arm.com>
Wed, 17 Apr 2013 19:09:09 +0000 (12:09 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 17 Apr 2013 19:51:32 +0000 (12:51 -0700)
commitddd504b3901a273d97757a11fdd7df52b578ee9b
tree419287be95672919211746e6657be7f56c19ab06
parent05d9fb8550c00cf0d450cd8047639fc13f2cb7b4
ARM: KVM: fix unbalanced get_cpu() in access_dcsw

In the very unlikely event where a guest would be foolish enough to
*read* from a write-only cache maintainance register, we end up
with preemption disabled, due to a misplaced get_cpu().

Just move the "is_write" test outside of the critical section.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <cdall@cs.columbia.edu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/arm/kvm/coproc.c