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