Lv Zheng 5ac557ef49 ACPI / IPMI: Fix race caused by the unprotected ACPI IPMI transfers
This patch fixes races caused by unprotected ACPI IPMI transfers.

We can see that the following crashes may occur:
 1. There is no tx_msg_lock held for iterating tx_msg_list in
    ipmi_flush_tx_msg() while it may be unlinked on failure in
    parallel in acpi_ipmi_space_handler() under tx_msg_lock.
 2. There is no lock held for freeing tx_msg in acpi_ipmi_space_handler()
    while it may be accessed in parallel in ipmi_flush_tx_msg() and
    ipmi_msg_handler().

This patch enhances tx_msg_lock to protect all tx_msg accesses to solve
this issue.  Then tx_msg_lock is always held around complete() and tx_msg
accesses.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Reviewed-by: Huang Ying <ying.huang@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-09-30 19:46:11 +02:00
..
2013-09-06 13:30:06 -07:00
2013-09-25 15:50:53 -07:00
2013-09-13 15:09:52 +02:00
2013-09-03 11:37:15 -07:00
2013-09-13 15:09:52 +02:00
2013-09-28 16:32:12 +02:00
2013-09-12 11:29:26 -07:00
2013-09-09 16:35:29 -07:00
2013-09-25 15:12:46 -07:00
2013-09-06 13:30:06 -07:00
2013-09-13 15:09:52 +02:00
2013-09-13 15:09:52 +02:00
2013-09-13 15:09:52 +02:00
2013-09-06 13:21:16 -07:00
2013-09-11 15:59:15 -07:00
2013-09-13 15:09:52 +02:00
2013-09-29 13:47:00 -07:00
2013-09-03 11:37:15 -07:00
2013-09-26 16:22:29 -07:00
2013-08-19 17:08:16 -07:00
2013-09-04 11:28:04 -06:00
2013-09-17 22:56:09 +03:00
2013-09-26 15:33:23 +03:00
2013-09-13 15:09:52 +02:00
2013-09-25 15:50:53 -07:00