Merge tag 'acpi-4.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull ACPI fixes from Rafael Wysocki:
"These fix two regressions introduced recently, one by reverting the
problematic commit and one by fixing up locking in the ACPICA core.

Specifics:

- Revert a recent change that added an ACPI video blacklist entry for
HP Pavilion dv6 as it turned to introduce backlight handling
regressions on some systems (Hans de Goede).

- Fix locking in the ACPICA core to avoid deadlocks related to table
loading that were exposed by a recent change in that area (Lv
Zheng)"

* tag 'acpi-4.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
Revert "ACPI / video: Add force_native quirk for HP Pavilion dv6"
ACPICA: Tables: Fix hidden logic related to acpi_tb_install_standard_table()

+17 -20
+2 -7
drivers/acpi/acpica/tbdata.c
··· 852 852 853 853 ACPI_FUNCTION_TRACE(tb_install_and_load_table); 854 854 855 - (void)acpi_ut_acquire_mutex(ACPI_MTX_TABLES); 856 - 857 855 /* Install the table and load it into the namespace */ 858 856 859 857 status = acpi_tb_install_standard_table(address, flags, TRUE, 860 858 override, &i); 861 859 if (ACPI_FAILURE(status)) { 862 - goto unlock_and_exit; 860 + goto exit; 863 861 } 864 862 865 - (void)acpi_ut_release_mutex(ACPI_MTX_TABLES); 866 863 status = acpi_tb_load_table(i, acpi_gbl_root_node); 867 - (void)acpi_ut_acquire_mutex(ACPI_MTX_TABLES); 868 864 869 - unlock_and_exit: 865 + exit: 870 866 *table_index = i; 871 - (void)acpi_ut_release_mutex(ACPI_MTX_TABLES); 872 867 return_ACPI_STATUS(status); 873 868 } 874 869
+15 -2
drivers/acpi/acpica/tbinstal.c
··· 217 217 goto release_and_exit; 218 218 } 219 219 220 + /* Acquire the table lock */ 221 + 222 + (void)acpi_ut_acquire_mutex(ACPI_MTX_TABLES); 223 + 220 224 if (reload) { 221 225 /* 222 226 * Validate the incoming table signature. ··· 248 244 new_table_desc.signature.integer)); 249 245 250 246 status = AE_BAD_SIGNATURE; 251 - goto release_and_exit; 247 + goto unlock_and_exit; 252 248 } 253 249 254 250 /* Check if table is already registered */ ··· 283 279 /* Table is still loaded, this is an error */ 284 280 285 281 status = AE_ALREADY_EXISTS; 286 - goto release_and_exit; 282 + goto unlock_and_exit; 287 283 } else { 288 284 /* 289 285 * Table was unloaded, allow it to be reloaded. ··· 294 290 * indicate the re-installation. 295 291 */ 296 292 acpi_tb_uninstall_table(&new_table_desc); 293 + (void)acpi_ut_release_mutex(ACPI_MTX_TABLES); 297 294 *table_index = i; 298 295 return_ACPI_STATUS(AE_OK); 299 296 } ··· 308 303 309 304 /* Invoke table handler if present */ 310 305 306 + (void)acpi_ut_release_mutex(ACPI_MTX_TABLES); 311 307 if (acpi_gbl_table_handler) { 312 308 (void)acpi_gbl_table_handler(ACPI_TABLE_EVENT_INSTALL, 313 309 new_table_desc.pointer, 314 310 acpi_gbl_table_handler_context); 315 311 } 312 + (void)acpi_ut_acquire_mutex(ACPI_MTX_TABLES); 313 + 314 + unlock_and_exit: 315 + 316 + /* Release the table lock */ 317 + 318 + (void)acpi_ut_release_mutex(ACPI_MTX_TABLES); 316 319 317 320 release_and_exit: 318 321
-11
drivers/acpi/video_detect.c
··· 305 305 DMI_MATCH(DMI_PRODUCT_NAME, "Dell System XPS L702X"), 306 306 }, 307 307 }, 308 - { 309 - /* https://bugzilla.redhat.com/show_bug.cgi?id=1204476 */ 310 - /* https://bugs.launchpad.net/ubuntu/+source/linux-lts-trusty/+bug/1416940 */ 311 - .callback = video_detect_force_native, 312 - .ident = "HP Pavilion dv6", 313 - .matches = { 314 - DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), 315 - DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion dv6 Notebook PC"), 316 - }, 317 - }, 318 - 319 308 { }, 320 309 }; 321 310