lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <21501af5-7558-4a15-bf0c-76b530792a36@kernel.org>
Date: Thu, 23 May 2024 11:27:17 +0200
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Anastasia Belova <abelova@...ralinux.ru>,
 Sylwester Nawrocki <s.nawrocki@...sung.com>
Cc: Mauro Carvalho Chehab <mchehab@...nel.org>,
 Alim Akhtar <alim.akhtar@...sung.com>,
 Kyungmin Park <kyungmin.park@...sung.com>, linux-media@...r.kernel.org,
 linux-arm-kernel@...ts.infradead.org, linux-samsung-soc@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH RFC] [media] s5p-fimc: fix sleep in atomic in
 flite_hw_reset

On 21/05/2024 09:36, Anastasia Belova wrote:
> flite_hw_reset is called in fimc_lite_resume with spinlock
> acquired that is forbidden. Replace usleep_range with udelay.
> 
> Fixes: 2b511edb986f ("[media] s5p-fimc: Add FIMC-LITE register definitions")
> Signed-off-by: Anastasia Belova <abelova@...ralinux.ru>
> ---
>  drivers/media/platform/samsung/exynos4-is/fimc-lite-reg.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/media/platform/samsung/exynos4-is/fimc-lite-reg.c b/drivers/media/platform/samsung/exynos4-is/fimc-lite-reg.c
> index 2483277a6cb0..f1e7375c9a5f 100644
> --- a/drivers/media/platform/samsung/exynos4-is/fimc-lite-reg.c
> +++ b/drivers/media/platform/samsung/exynos4-is/fimc-lite-reg.c
> @@ -30,7 +30,7 @@ void flite_hw_reset(struct fimc_lite *dev)
>  		cfg = readl(dev->regs + FLITE_REG_CIGCTRL);
>  		if (cfg & FLITE_REG_CIGCTRL_SWRST_RDY)
>  			break;
> -		usleep_range(1000, 5000);
> +		udelay(1000);

I think the code is rather wrong in fimc_lite_resume() - this should be
called outside of spinlock, thus usleep is ok.

Best regards,
Krzysztof


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ