From: Greg Kroah-Hartman Date: Thu, 30 Apr 2026 13:56:09 +0000 (+0200) Subject: 6.1-stable patches X-Git-Tag: v6.12.86~90 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=92e472f8e084e2d73afdb26b781bdd25a45d7cab;p=thirdparty%2Fkernel%2Fstable-queue.git 6.1-stable patches added patches: um-drivers-call-kernel_strrchr-explicitly-in-cow_user.c.patch wifi-rtw88-check-for-pci-upstream-bridge-existence.patch --- diff --git a/queue-6.1/series b/queue-6.1/series index 96517edd3b..07ae1dc2f5 100644 --- a/queue-6.1/series +++ b/queue-6.1/series @@ -177,3 +177,5 @@ regset-use-kvzalloc-for-regset_get_alloc.patch device-property-make-modifications-of-fwnode-flags-thread-safe.patch ocfs2-split-transactions-in-dio-completion-to-avoid-credit-exhaustion.patch driver-core-don-t-let-a-device-probe-until-it-s-read.patch +wifi-rtw88-check-for-pci-upstream-bridge-existence.patch +um-drivers-call-kernel_strrchr-explicitly-in-cow_user.c.patch diff --git a/queue-6.1/um-drivers-call-kernel_strrchr-explicitly-in-cow_user.c.patch b/queue-6.1/um-drivers-call-kernel_strrchr-explicitly-in-cow_user.c.patch new file mode 100644 index 0000000000..d64b730c12 --- /dev/null +++ b/queue-6.1/um-drivers-call-kernel_strrchr-explicitly-in-cow_user.c.patch @@ -0,0 +1,57 @@ +From 91e901c65b4da02a6fd543e3f0049829ae9645b7 Mon Sep 17 00:00:00 2001 +From: Michael Bommarito +Date: Wed, 8 Apr 2026 03:01:02 -0400 +Subject: um: drivers: call kernel_strrchr() explicitly in cow_user.c + +From: Michael Bommarito + +commit 91e901c65b4da02a6fd543e3f0049829ae9645b7 upstream. + +Building ARCH=um on glibc >= 2.43 fails: + + arch/um/drivers/cow_user.c: error: implicit declaration of + function 'strrchr' [-Wimplicit-function-declaration] + +glibc 2.43's C23 const-preserving strrchr() macro does not survive +UML's global -Dstrrchr=kernel_strrchr remap from arch/um/Makefile. +Call kernel_strrchr() directly in cow_user.c so the source no longer +depends on the -D rewrite. + +Fixes: 2c51a4bc0233 ("um: fix strrchr() problems") +Suggested-by: Johannes Berg +Cc: stable@vger.kernel.org +Assisted-by: Claude:claude-opus-4-6 +Assisted-by: Codex:gpt-5-4 +Signed-off-by: Michael Bommarito +Link: https://patch.msgid.link/20260408070102.2325572-1-michael.bommarito@gmail.com +[remove unnecessary 'extern'] +Signed-off-by: Johannes Berg +Signed-off-by: Greg Kroah-Hartman +--- + arch/um/drivers/cow_user.c | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +--- a/arch/um/drivers/cow_user.c ++++ b/arch/um/drivers/cow_user.c +@@ -15,6 +15,12 @@ + #include "cow.h" + #include "cow_sys.h" + ++/* ++ * arch/um/Makefile remaps strrchr to kernel_strrchr; call the kernel ++ * name directly to avoid glibc >= 2.43's C23 strrchr macro. ++ */ ++char *kernel_strrchr(const char *, int); ++ + #define PATH_LEN_V1 256 + + /* unsigned time_t works until year 2106 */ +@@ -153,7 +159,7 @@ static int absolutize(char *to, int size + errno); + return -1; + } +- slash = strrchr(from, '/'); ++ slash = kernel_strrchr(from, '/'); + if (slash != NULL) { + *slash = '\0'; + if (chdir(from)) { diff --git a/queue-6.1/wifi-rtw88-check-for-pci-upstream-bridge-existence.patch b/queue-6.1/wifi-rtw88-check-for-pci-upstream-bridge-existence.patch new file mode 100644 index 0000000000..6bf399ef18 --- /dev/null +++ b/queue-6.1/wifi-rtw88-check-for-pci-upstream-bridge-existence.patch @@ -0,0 +1,44 @@ +From eb101d2abdcccb514ca4fccd3b278dd8267374f6 Mon Sep 17 00:00:00 2001 +From: Fedor Pchelkin +Date: Fri, 20 Feb 2026 12:47:30 +0300 +Subject: wifi: rtw88: check for PCI upstream bridge existence + +From: Fedor Pchelkin + +commit eb101d2abdcccb514ca4fccd3b278dd8267374f6 upstream. + +pci_upstream_bridge() returns NULL if the device is on a root bus. If +8821CE is installed in the system with such a PCI topology, the probing +routine will crash. This has probably been unnoticed as 8821CE is mostly +supplied in laptops where there is a PCI-to-PCI bridge located upstream +from the device. However the card might be installed on a system with +different configuration. + +Check if the bridge does exist for the specific workaround to be applied. + +Found by Linux Verification Center (linuxtesting.org) with Svace static +analysis tool. + +Fixes: 24f5e38a13b5 ("rtw88: Disable PCIe ASPM while doing NAPI poll on 8821CE") +Cc: stable@vger.kernel.org +Signed-off-by: Fedor Pchelkin +Acked-by: Ping-Ke Shih +Signed-off-by: Ping-Ke Shih +Link: https://patch.msgid.link/20260220094730.49791-1-pchelkin@ispras.ru +Signed-off-by: Greg Kroah-Hartman +--- + drivers/net/wireless/realtek/rtw88/pci.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/drivers/net/wireless/realtek/rtw88/pci.c ++++ b/drivers/net/wireless/realtek/rtw88/pci.c +@@ -1784,7 +1784,8 @@ int rtw_pci_probe(struct pci_dev *pdev, + } + + /* Disable PCIe ASPM L1 while doing NAPI poll for 8821CE */ +- if (rtwdev->chip->id == RTW_CHIP_TYPE_8821C && bridge->vendor == PCI_VENDOR_ID_INTEL) ++ if (rtwdev->chip->id == RTW_CHIP_TYPE_8821C && ++ bridge && bridge->vendor == PCI_VENDOR_ID_INTEL) + rtwpci->rx_no_aspm = true; + + rtw_pci_phy_cfg(rtwdev);