commit | 3df663a147fe077a6ee8444ec626738946e65547 | [log] [tgz] |
---|---|---|
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | Fri Dec 27 11:04:21 2019 +0100 |
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | Fri Dec 27 11:04:21 2019 +0100 |
tree | 1059c7bd9be1c08fa5ffc7d058613c47de7df0c7 | |
parent | 46cf053efec6a3a5f343fead837777efe8252a46 [diff] |
ACPI: EC: Reference count query handlers under lock There is a race condition in acpi_ec_get_query_handler() theoretically allowing query handlers to go away before refernce counting them. In order to avoid it, call kref_get() on query handlers under ec->mutex. Also simplify the code a bit while at it. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>