Re: [ibm-acpi-devel] [PATCH] ACPI / battery: safe unregistering of hooks

2018-07-04 Thread Jouke Witteveen
On Sat, Jun 23, 2018 at 11:08:51AM +0200, Jouke Witteveen wrote: > As unregistering a hook takes it off the hook list, we should use a safe > for_each loop when we potentially unregister a hook. > > Signed-off-by: Jouke Witteveen > --- I would like to draw attention to this patch. It fixes a ver

Re: [ibm-acpi-devel] [PATCH] ACPI / battery: safe unregistering of hooks

2018-07-04 Thread Rafael J. Wysocki
On Wed, Jul 4, 2018 at 11:29 AM, Jouke Witteveen wrote: > On Sat, Jun 23, 2018 at 11:08:51AM +0200, Jouke Witteveen wrote: >> As unregistering a hook takes it off the hook list, we should use a safe >> for_each loop when we potentially unregister a hook. >> >> Signed-off-by: Jouke Witteveen >> --

[ibm-acpi-devel] [PATCH v2] ACPI / battery: Safe unregistering of hooks

2018-07-04 Thread Jouke Witteveen
A hooking API was implemented for 4.17 in fa93854f7a7ed63d followed by hooks for Thinkpad laptops in 2801b9683f740012. The Thinkpad drivers did not support the Thinkpad 13 and the hooking API crashes on unsupported batteries by altering a list of hooks during unsafe iteration. Thus, Thinkpad 13 lap