[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <555A80DA.5030700@samsung.com>
Date: Tue, 19 May 2015 09:16:26 +0900
From: Krzysztof Kozlowski <k.kozlowski@...sung.com>
To: Joe Perches <joe@...ches.com>, Chanwoo Choi <cw00.choi@...sung.com>
Cc: Dan Carpenter <dan.carpenter@...cle.com>,
Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>, linux-kernel@...r.kernel.org,
kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] regulator: max77686: fix gpio_enabled shift wrapping bug
On 19.05.2015 02:01, Joe Perches wrote:
> The code should handle more than 32 bits here because "id"
> can be a value up to MAX77686_REGULATORS (currently 34).
>
> Convert the gpio_enabled type to DECLARE_BITMAP and use
> test_bit/set_bit.
>
> Fixes: 3307e9025d29 ("regulator: max77686: Add GPIO control")
> Reported-by: Dan Carpenter <dan.carpenter@...cle.com>
> Signed-off-by: Joe Perches <joe@...ches.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@...sung.com>
Tested-by: Krzysztof Kozlowski <k.kozlowski@...sung.com>
Again - why you do not add CC-stable? If you need observational bug
effect to the commit message you can add:
<<When max77686 regulator was configured to GPIO controlled mode, the
overflow of 32 bit regulator ID could switch off completely different
regulators. This could happen because for other regulators the value of
"GPIO controlled mode" means "disabled".>>
Although I did not saw such effect of overflow in testing, it actually
should happen looking at the code.
Best regards,
Krzysztof
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists