]> git.baikalelectronics.ru Git - kernel.git/commit
ACPI / Battery: Resolve the race condition in the sysfs_remove_battery()
authorLan Tianyu <tianyu.lan@intel.com>
Thu, 30 Jun 2011 03:34:12 +0000 (11:34 +0800)
committerLen Brown <len.brown@intel.com>
Thu, 14 Jul 2011 04:06:19 +0000 (00:06 -0400)
commitb97778e832ea1248066898cd28c42c6b4f4e13d0
treeca32ce369889d8a2f0b2e5f242dd0dd670ca3376
parent8a1bc58da28cc041a4ff174b877a20d80fea7c4b
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: Lan Tianyu <tianyu.lan@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/acpi/battery.c