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] [thread-next>] [day] [month] [year] [list]
Message-ID: <9c581f57-3fe1-4048-bdb6-bc5f403cd1f2@web.de>
Date: Mon, 18 Aug 2025 17:09:28 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
 linux-arm-msm@...r.kernel.org
Cc: LKML <linux-kernel@...r.kernel.org>,
 Bjorn Andersson <andersson@...nel.org>,
 Dan Carpenter <dan.carpenter@...aro.org>,
 Konrad Dybcio <konradybcio@...nel.org>
Subject: Re: [PATCH v3] soc: qcom: icc-bwmon: Fix handling
 dev_pm_opp_find_bw_*() errors

…
> let's make the code just obvious to silence warning reported by Smatch:
> 
>   icc-bwmon.c:693 bwmon_intr_thread() error: 'target_opp' dereferencing possible ERR_PTR()
…

How do you think about to add any tags (like “Fixes” and “Cc”) accordingly?


…
> +++ b/drivers/soc/qcom/icc-bwmon.c
> @@ -656,6 +656,9 @@ static irqreturn_t bwmon_intr_thread(int irq, void *dev_id)
>  	if (IS_ERR(target_opp) && PTR_ERR(target_opp) == -ERANGE)
>  		target_opp = dev_pm_opp_find_bw_floor(bwmon->dev, &bw_kbps, 0);
>  
> +	if (IS_ERR(target_opp))
> +		return IRQ_HANDLED;
> +
>  	bwmon->target_kbps = bw_kbps;
…

Would you like to avoid a duplicate condition check here?

	if (IS_ERR(target_opp) {
		if (PTR_ERR(target_opp) == -ERANGE)
			target_opp = dev_pm_opp_find_bw_floor(bwmon->dev, &bw_kbps, 0);

		return IRQ_HANDLED;
	}


Regards,
Markus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ