]> asedeno.scripts.mit.edu Git - linux.git/commit
platform/x86: hp-wmi: Fix ACPI errors caused by too small buffer
authorHans de Goede <hdegoede@redhat.com>
Fri, 22 Nov 2019 18:56:40 +0000 (19:56 +0100)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 25 Nov 2019 10:59:17 +0000 (12:59 +0200)
commit16245db1489cd9aa579506f64afeeeb13d825a93
tree7997542ddb1451e4400b4278142bdf1af7f11fd6
parent5406327d43edd9a171bd260f49c752d148727eaf
platform/x86: hp-wmi: Fix ACPI errors caused by too small buffer

The HP WMI calls may take up to 128 bytes of data as input, and
the AML methods implementing the WMI calls, declare a couple of fields for
accessing input in different sizes, specifycally the HWMC method contains:

        CreateField (Arg1, 0x80, 0x0400, D128)

Even though we do not use any of the WMI command-types which need a buffer
of this size, the APCI interpreter still tries to create it as it is
declared in generoc code at the top of the HWMC method which runs before
the code looks at which command-type is requested.

This results in many of these errors on many different HP laptop models:

[   14.459261] ACPI Error: Field [D128] at 1152 exceeds Buffer [NULL] size 160 (bits) (20170303/dsopcode-236)
[   14.459268] ACPI Error: Method parse/execution failed [\HWMC] (Node ffff8edcc61507f8), AE_AML_BUFFER_LIMIT (20170303/psparse-543)
[   14.459279] ACPI Error: Method parse/execution failed [\_SB.WMID.WMAA] (Node ffff8edcc61523c0), AE_AML_BUFFER_LIMIT (20170303/psparse-543)

This commit increases the size of the data element of the bios_args struct
to 128 bytes fixing these errors.

Cc: stable@vger.kernel.org
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=197007
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=201981
BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1520703
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/platform/x86/hp-wmi.c