Chris Bainbridge 6b5eab5469 ACPI / EC: fix NULL pointer dereference in acpi_ec_remove_query_handler()
Use list_for_each_entry_safe for iterating because handler may be freed
in the loop.

BUG: unable to handle kernel NULL pointer dereference at 000000000000002c
IP: [<ffffffff814d69c8>] acpi_ec_put_query_handler+0x7/0x1a
Call Trace:
 acpi_ec_remove_query_handler+0x87/0x97
 acpi_smbus_hc_remove+0x2a/0x44 [sbshc]
 acpi_device_remove+0x7b/0x9a
 __device_release_driver+0x7e/0x110
 driver_detach+0xb0/0xc0
 bus_remove_driver+0x54/0xe0
 driver_unregister+0x2b/0x60
 acpi_bus_unregister_driver+0x10/0x12
 acpi_smb_hc_driver_exit+0x10/0x12 [sbshc]
 SyS_delete_module+0x1b8/0x210
 system_call_fastpath+0x12/0x6a

Signed-off-by: Chris Bainbridge <chris.bainbridge@gmail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-04-22 04:12:35 +02:00
..
2015-04-16 13:53:32 -05:00
2015-04-16 14:01:03 -05:00
2015-04-15 15:41:41 -07:00
2015-03-20 17:50:07 +01:00
2015-04-16 13:53:32 -05:00
2015-04-01 10:29:05 -07:00
2015-04-14 17:29:55 -07:00
2015-04-16 19:02:04 -04:00
2015-04-16 14:01:03 -05:00
2015-04-07 12:05:12 +02:00
2015-04-16 14:01:03 -05:00
2015-04-13 17:07:21 -07:00
2015-03-31 12:01:19 -04:00
2015-04-08 08:11:51 -06:00
2015-04-11 15:53:35 -04:00
2015-04-16 13:53:32 -05:00
2015-04-16 14:01:03 -05:00