Bug ID: 212277
           Summary: Access to ACPI table after release
           Product: ACPI
           Version: 2.5
    Kernel Version: 5.12-rc2
          Hardware: All
                OS: Linux
              Tree: Mainline
            Status: NEW
          Severity: normal
          Priority: P1
         Component: ACPICA-Core
        Regression: No

In drivers/acpi/sleep.c, a table pointer form acpi_get_table() seems to be used
after it has been released with acpi_put_table(). AFAIK this shouldn't be done.

acpi_sleep_hibernate_setup() stores an ACPI table from acpi_get_table() in the
global variable facs and then releases the table with acpi_put_table():

        acpi_get_table(ACPI_SIG_FACS, 1, (struct acpi_table_header **)&facs);
        if (facs) {                                                             
                s4_hardware_signature = facs->hardware_signature;
                acpi_put_table((struct acpi_table_header *)facs);

acpi_hibernation_leave() later accesses *facs:

        /* Check the hardware signature */
        if (facs && s4_hardware_signature != facs->hardware_signature)
                pr_crit("ACPI: Hardware changed while hibernated, success

This doesn't seem correct. I would guess acpi_hibernation_leave() should
probably do its own acpi_get_table()/acpi_put_table().

You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

acpi-bugzilla mailing list

Reply via email to