[PATCH] ARM: KVM: fix unbalanced get_cpu() in access_dcsw

Marc Zyngier marc.zyngier at arm.com
Fri Apr 12 15:17:46 EDT 2013


On Fri, 12 Apr 2013 19:13:32 +0100, Will Deacon <will.deacon at arm.com>
wrote:
> On Fri, Apr 12, 2013 at 06:13:48PM +0100, Marc Zyngier wrote:
>> 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 at arm.com>
> 
> I found it second time around!
> 
>   Reported-by: Will Deacon <will.deacon at arm.com>

Indeed you did! :-)

I'll add that to the commit, and on a couple of other as well...

        M.
-- 
Fast, cheap, reliable. Pick two.



More information about the linux-arm-kernel mailing list