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: <ZIy36DQpTDmWpoiW@duo.ucw.cz>
Date:   Fri, 16 Jun 2023 21:28:40 +0200
From:   Pavel Machek <pavel@...x.de>
To:     Sasha Levin <sashal@...nel.org>
Cc:     linux-kernel@...r.kernel.org, stable@...r.kernel.org,
        Hans de Goede <hdegoede@...hat.com>,
        Sebastian Reichel <sebastian.reichel@...labora.com>,
        sre@...nel.org, linux-pm@...r.kernel.org
Subject: Re: [PATCH AUTOSEL 4.14 02/10] power: supply: bq27xxx: Use
 mod_delayed_work() instead of cancel() + schedule()

Hi!

> From: Hans de Goede <hdegoede@...hat.com>
> 
> [ Upstream commit 59dddea9879713423c7b2ade43c423bb71e0d216 ]
> 
> Use mod_delayed_work() instead of separate cancel_delayed_work_sync() +
> schedule_delayed_work() calls.

AFAICT this is just a cleanup, we should not need it for -stable.

Best regards,
								Pavel
								
> +++ b/drivers/power/supply/bq27xxx_battery.c
> @@ -832,10 +832,8 @@ static int poll_interval_param_set(const char *val, const struct kernel_param *k
>  		return ret;
>  
>  	mutex_lock(&bq27xxx_list_lock);
> -	list_for_each_entry(di, &bq27xxx_battery_devices, list) {
> -		cancel_delayed_work_sync(&di->work);
> -		schedule_delayed_work(&di->work, 0);
> -	}
> +	list_for_each_entry(di, &bq27xxx_battery_devices, list)
> +		mod_delayed_work(system_wq, &di->work, 0);
>  	mutex_unlock(&bq27xxx_list_lock);
>  
>  	return ret;

-- 
DENX Software Engineering GmbH,        Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

Download attachment "signature.asc" of type "application/pgp-signature" (196 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ