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: <42cb421a-286e-65db-36b1-4fa794758279@infradead.org>
Date:   Wed, 2 Sep 2020 08:50:55 -0700
From:   Randy Dunlap <rdunlap@...radead.org>
To:     Colin King <colin.king@...onical.com>,
        Sebastian Reichel <sre@...nel.org>,
        Chanwoo Choi <cw00.choi@...sung.com>,
        Kyungmin Park <kyungmin.park@...sung.com>,
        Myungjoo Ham <myungjoo.ham@...sung.com>,
        Anton Vorontsov <anton.vorontsov@...aro.org>,
        linux-pm@...r.kernel.org
Cc:     kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org,
        "Gustavo A. R. Silva" <gustavoars@...nel.org>
Subject: Re: [PATCH][next] charger-manager: fix incorrect check on
 charging_duration_ms

On 9/2/20 6:31 AM, Colin King wrote:
> From: Colin Ian King <colin.king@...onical.com>
> 
> Currently the duration check on the discharging duration setting is
> checking the charging duration rather than the discharging duration
> due to a cut-n-paste coding error. Fix this by checking the value
> desc->charging_max_duration_ms.
> 
> Addresses-Coverity: ("Copy-paste-error")
> Fixes: 8fcfe088e21a ("charger-manager: Support limit of maximum possible")
> Signed-off-by: Colin Ian King <colin.king@...onical.com>

Gustavo has a different patch:
https://lore.kernel.org/lkml/20200902153846.GA10327@embeddedor/

> ---
>  drivers/power/supply/charger-manager.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/power/supply/charger-manager.c b/drivers/power/supply/charger-manager.c
> index 07992821e252..44d919954e9e 100644
> --- a/drivers/power/supply/charger-manager.c
> +++ b/drivers/power/supply/charger-manager.c
> @@ -471,7 +471,7 @@ static int check_charging_duration(struct charger_manager *cm)
>  	} else if (cm->battery_status == POWER_SUPPLY_STATUS_NOT_CHARGING) {
>  		duration = curr - cm->charging_end_time;
>  
> -		if (duration > desc->charging_max_duration_ms) {
> +		if (duration > desc->discharging_max_duration_ms) {
>  			dev_info(cm->dev, "Discharging duration exceed %ums\n",

preferably change:	                                        exceeds


>  				 desc->discharging_max_duration_ms);
>  			ret = true;
> 


-- 
~Randy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ