From: Greg Kroah-Hartman Date: Wed, 1 Sep 2021 15:26:14 +0000 (+0200) Subject: 5.13-stable patches X-Git-Tag: v4.4.283~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9ff37a033988b1fc9431eb65ca730e9e491e0c60;p=thirdparty%2Fkernel%2Fstable-queue.git 5.13-stable patches added patches: platform-x86-make-dual_accel_detect-kiox010a-kiox020a-detect-more-robust.patch --- diff --git a/queue-5.13/platform-x86-make-dual_accel_detect-kiox010a-kiox020a-detect-more-robust.patch b/queue-5.13/platform-x86-make-dual_accel_detect-kiox010a-kiox020a-detect-more-robust.patch new file mode 100644 index 00000000000..fc8b506bda6 --- /dev/null +++ b/queue-5.13/platform-x86-make-dual_accel_detect-kiox010a-kiox020a-detect-more-robust.patch @@ -0,0 +1,37 @@ +From 085fc31f81765e061c78cdcab0e5516fd672bff7 Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Mon, 2 Aug 2021 16:10:00 +0200 +Subject: platform/x86: Make dual_accel_detect() KIOX010A + KIOX020A detect more robust + +From: Hans de Goede + +commit 085fc31f81765e061c78cdcab0e5516fd672bff7 upstream. + +360 degree hinges devices with dual KIOX010A + KIOX020A accelerometers +always have both a KIOX010A and a KIOX020A ACPI device (one for each +accel). + +Theoretical some vendor may re-use some DSDT for a non-convertible +stripping out just the KIOX020A ACPI device from the DSDT. Check that +both ACPI devices are present to make the check more robust. + +Fixes: 153cca9caa81 ("platform/x86: Add and use a dual_accel_detect() helper") +Signed-off-by: Hans de Goede +Link: https://lore.kernel.org/r/20210802141000.978035-1-hdegoede@redhat.com +Signed-off-by: Greg Kroah-Hartman +--- + drivers/platform/x86/dual_accel_detect.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/drivers/platform/x86/dual_accel_detect.h ++++ b/drivers/platform/x86/dual_accel_detect.h +@@ -60,7 +60,8 @@ static bool dual_accel_detect_bosc0200(v + static bool dual_accel_detect(void) + { + /* Systems which use a pair of accels with KIOX010A / KIOX020A ACPI ids */ +- if (acpi_dev_present("KIOX010A", NULL, -1)) ++ if (acpi_dev_present("KIOX010A", NULL, -1) && ++ acpi_dev_present("KIOX020A", NULL, -1)) + return true; + + /* Systems which use a single DUAL250E ACPI device to model 2 accels */ diff --git a/queue-5.13/series b/queue-5.13/series index 46306bb9aea..d10d38cb874 100644 --- a/queue-5.13/series +++ b/queue-5.13/series @@ -111,3 +111,4 @@ ubifs-report-correct-st_size-for-encrypted-symlinks.patch revert-parisc-add-assembly-implementations-for-memset-strlen-strcpy-strncpy-and-strcat.patch net-don-t-unconditionally-copy_from_user-a-struct-ifreq-for-socket-ioctls.patch audit-move-put_tree-to-avoid-trim_trees-refcount-underflow-and-uaf.patch +platform-x86-make-dual_accel_detect-kiox010a-kiox020a-detect-more-robust.patch