Skip to content
Commit 9c921c22 authored by Lan Tianyu's avatar Lan Tianyu Committed by Len Brown
Browse files

ACPI / Battery: Resolve the race condition in the sysfs_remove_battery()

Use battery->lock in sysfs_remove_battery() to make
checking, removing, and clearing bat.dev atomic.
This is necessary because sysfs_remove_battery() may
be invoked concurrently from different paths.

    https://bugzilla.kernel.org/show_bug.cgi?id=35642



Signed-off-by: default avatarLan Tianyu <tianyu.lan@intel.com>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 6e17fb6a
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