]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.15-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Feb 2023 11:50:54 +0000 (12:50 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Feb 2023 11:50:54 +0000 (12:50 +0100)
added patches:
net-sched-sch-fix-off-by-one-in-htb_activate_prios.patch
platform-x86-amd-pmc-add-config_serio-dependency.patch

queue-5.15/net-sched-sch-fix-off-by-one-in-htb_activate_prios.patch [new file with mode: 0644]
queue-5.15/platform-x86-amd-pmc-add-config_serio-dependency.patch [new file with mode: 0644]
queue-5.15/series

diff --git a/queue-5.15/net-sched-sch-fix-off-by-one-in-htb_activate_prios.patch b/queue-5.15/net-sched-sch-fix-off-by-one-in-htb_activate_prios.patch
new file mode 100644 (file)
index 0000000..d4f6e30
--- /dev/null
@@ -0,0 +1,33 @@
+From 9cec2aaffe969f2a3e18b5ec105fc20bb908e475 Mon Sep 17 00:00:00 2001
+From: Dan Carpenter <error27@gmail.com>
+Date: Mon, 6 Feb 2023 16:18:32 +0300
+Subject: net: sched: sch: Fix off by one in htb_activate_prios()
+
+From: Dan Carpenter <error27@gmail.com>
+
+commit 9cec2aaffe969f2a3e18b5ec105fc20bb908e475 upstream.
+
+The > needs be >= to prevent an out of bounds access.
+
+Fixes: de5ca4c3852f ("net: sched: sch: Bounds check priority")
+Signed-off-by: Dan Carpenter <error27@gmail.com>
+Reviewed-by: Simon Horman <simon.horman@corigine.com>
+Reviewed-by: Kees Cook <keescook@chromium.org>
+Link: https://lore.kernel.org/r/Y+D+KN18FQI2DKLq@kili
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/sched/sch_htb.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/net/sched/sch_htb.c
++++ b/net/sched/sch_htb.c
+@@ -429,7 +429,7 @@ static void htb_activate_prios(struct ht
+               while (m) {
+                       unsigned int prio = ffz(~m);
+-                      if (WARN_ON_ONCE(prio > ARRAY_SIZE(p->inner.clprio)))
++                      if (WARN_ON_ONCE(prio >= ARRAY_SIZE(p->inner.clprio)))
+                               break;
+                       m &= ~(1 << prio);
diff --git a/queue-5.15/platform-x86-amd-pmc-add-config_serio-dependency.patch b/queue-5.15/platform-x86-amd-pmc-add-config_serio-dependency.patch
new file mode 100644 (file)
index 0000000..59143a8
--- /dev/null
@@ -0,0 +1,37 @@
+From abce209d18fd26e865b2406cc68819289db973f9 Mon Sep 17 00:00:00 2001
+From: Arnd Bergmann <arnd@arndb.de>
+Date: Fri, 27 Jan 2023 10:39:44 +0100
+Subject: platform/x86/amd: pmc: add CONFIG_SERIO dependency
+
+From: Arnd Bergmann <arnd@arndb.de>
+
+commit abce209d18fd26e865b2406cc68819289db973f9 upstream.
+
+Using the serio subsystem now requires the code to be reachable:
+
+x86_64-linux-ld: drivers/platform/x86/amd/pmc.o: in function `amd_pmc_suspend_handler':
+pmc.c:(.text+0x86c): undefined reference to `serio_bus'
+
+Add the usual dependency: as other users of serio use 'select'
+rather than 'depends on', use the same here.
+
+Fixes: 8e60615e8932 ("platform/x86/amd: pmc: Disable IRQ1 wakeup for RN/CZN")
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+Link: https://lore.kernel.org/r/20230127093950.2368575-1-arnd@kernel.org
+Reviewed-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/platform/x86/Kconfig |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/platform/x86/Kconfig
++++ b/drivers/platform/x86/Kconfig
+@@ -171,6 +171,7 @@ config ACER_WMI
+ config AMD_PMC
+       tristate "AMD SoC PMC driver"
+       depends on ACPI && PCI
++      select SERIO
+       help
+         The driver provides support for AMD Power Management Controller
+         primarily responsible for S2Idle transactions that are driven from
index 5bf7085b1d1d78502ebff663840332cc85febcff..983a1c6b07cf6dfc9182b359a5058db32d77cd13 100644 (file)
@@ -79,3 +79,5 @@ net-sched-tcindex-search-key-must-be-16-bits.patch
 kvm-initialize-all-of-the-kvm_debugregs-structure-before-sending-it-to-userspace.patch
 alarmtimer-prevent-starvation-by-small-intervals-and-sig_ign.patch
 asoc-sof-intel-hda-dai-fix-possible-stream_tag-leak.patch
+net-sched-sch-fix-off-by-one-in-htb_activate_prios.patch
+platform-x86-amd-pmc-add-config_serio-dependency.patch