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:
 <ZQ2PR01MB1307F3BE491E2557593BDDE2E69C2@ZQ2PR01MB1307.CHNPR01.prod.partner.outlook.cn>
Date: Wed, 4 Sep 2024 03:35:04 +0000
From: Hal Feng <hal.feng@...rfivetech.com>
To: Changhuang Liang <changhuang.liang@...rfivetech.com>, Emil Renner Berthing
	<kernel@...il.dk>, Philipp Zabel <p.zabel@...gutronix.de>
CC: Conor Dooley <conor.dooley@...rochip.com>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>, "linux-riscv@...ts.infradead.org"
	<linux-riscv@...ts.infradead.org>
Subject: RE: [v1] reset: starfive: Fixed access the empty member on JH7110 SoC

> On 04.09.24 10:47, Changhuang Liang wrote:
> data->asserted will be NULL on JH7110 SoC since commit 82327b127d41
> ("reset: starfive: Add StarFive JH7110 reset driver") be added. Add the
> judgment conditions to avoid errors.
> 
> Signed-off-by: Changhuang Liang <changhuang.liang@...rfivetech.com>
> ---
>  drivers/reset/starfive/reset-starfive-jh71x0.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/reset/starfive/reset-starfive-jh71x0.c
> b/drivers/reset/starfive/reset-starfive-jh71x0.c
> index 55bbbd2de52c..29ce3486752f 100644
> --- a/drivers/reset/starfive/reset-starfive-jh71x0.c
> +++ b/drivers/reset/starfive/reset-starfive-jh71x0.c
> @@ -94,6 +94,9 @@ static int jh71x0_reset_status(struct
> reset_controller_dev *rcdev,
>  	void __iomem *reg_status = data->status + offset * sizeof(u32);
>  	u32 value = readl(reg_status);
> 
> +	if (!data->asserted)
> +		return !(value & mask);
> +
>  	return !((value ^ data->asserted[offset]) & mask);  }

Looks good. Maybe the commit message can be improved.

Acked-by: Hal Feng <hal.feng@...rfivetech.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ