[PATCH v2 19/20] arm64: atomic64_dec_if_positive: fix incorrect branch condition

Catalin Marinas catalin.marinas at arm.com
Fri Jul 24 08:45:02 PDT 2015


On Fri, Jul 24, 2015 at 11:42:10AM +0100, Will Deacon wrote:
> If we attempt to atomic64_dec_if_positive on INT_MIN, we will underflow
> and incorrectly decide that the original parameter was positive.
> 
> This patches fixes the broken condition code so that we handle this
> corner case correctly.
> 
> Reviewed-by: Steve Capper <steve.capper at arm.com>
> Signed-off-by: Will Deacon <will.deacon at arm.com>

Acked-by: Catalin Marinas <catalin.marinas at arm.com>



More information about the linux-arm-kernel mailing list