Skip to content
Commit 673b4271 authored by Jouke Witteveen's avatar Jouke Witteveen Committed by Rafael J. Wysocki
Browse files

ACPI / battery: Safe unregistering of hooks

A hooking API was implemented for 4.17 in fa93854f followed
by hooks for Thinkpad laptops in 2801b968. 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 laptops could no longer boot.

Additionally, a lock was kept in place and debugging information was
printed out of order.

Fixes: fa93854f

 (battery: Add the battery hooking API)
Cc: 4.17+ <stable@vger.kernel.org> # 4.17+
Signed-off-by: default avatarJouke Witteveen <j.witteveen@gmail.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 021c9179
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment