From f21204d5a52d78b19e66a9ed40e1655df34e5b64 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 26 Sep 2022 18:15:35 +0200 Subject: [PATCH] drop some more 4.9 patches THese were only in 4.9 and should have also been in newer releases at the same point in time. Signed-off-by: Greg Kroah-Hartman --- ...ar-add-missing-of_node_put-in-time.c.patch | 61 ------------------- ...tiq-add-missing-of_node_put-in-irq.c.patch | 35 ----------- ...con-fix-refcount-leak-bug-in-sysctrl.patch | 40 ------------ ...way-fix-refcount-leak-bug-in-sysctrl.patch | 38 ------------ queue-4.9/series | 5 -- ...lfb-use-aperture-size-from-pci_resou.patch | 56 ----------------- 6 files changed, 235 deletions(-) delete mode 100644 queue-4.9/arm-mach-spear-add-missing-of_node_put-in-time.c.patch delete mode 100644 queue-4.9/mips-lantiq-add-missing-of_node_put-in-irq.c.patch delete mode 100644 queue-4.9/mips-lantiq-falcon-fix-refcount-leak-bug-in-sysctrl.patch delete mode 100644 queue-4.9/mips-lantiq-xway-fix-refcount-leak-bug-in-sysctrl.patch delete mode 100644 queue-4.9/video-fbdev-intelfb-use-aperture-size-from-pci_resou.patch diff --git a/queue-4.9/arm-mach-spear-add-missing-of_node_put-in-time.c.patch b/queue-4.9/arm-mach-spear-add-missing-of_node_put-in-time.c.patch deleted file mode 100644 index 12842639f7a..00000000000 --- a/queue-4.9/arm-mach-spear-add-missing-of_node_put-in-time.c.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 36321bb4ae4d9831fed71238b076d1eb4a8bba8e Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Thu, 16 Jun 2022 17:30:27 +0800 -Subject: arm: mach-spear: Add missing of_node_put() in time.c - -From: Liang He - -[ Upstream commit 2c629dd2d14fd7f64a553f809eda6d0b3a4f615a ] - -In spear_setup_of_timer(), of_find_matching_node() will return a -node pointer with refcount incrementd. We should use of_node_put() -in each fail path or when it is not used anymore. - -Signed-off-by: Liang He -Acked-by: Viresh Kumar -Link: https://lore.kernel.org/r/20220616093027.3984903-1-windhl@126.com' -Signed-off-by: Arnd Bergmann -Signed-off-by: Sasha Levin ---- - arch/arm/mach-spear/time.c | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -diff --git a/arch/arm/mach-spear/time.c b/arch/arm/mach-spear/time.c -index aaaa6781b9fe..57b77c7effa9 100644 ---- a/arch/arm/mach-spear/time.c -+++ b/arch/arm/mach-spear/time.c -@@ -223,13 +223,13 @@ void __init spear_setup_of_timer(void) - irq = irq_of_parse_and_map(np, 0); - if (!irq) { - pr_err("%s: No irq passed for timer via DT\n", __func__); -- return; -+ goto err_put_np; - } - - gpt_base = of_iomap(np, 0); - if (!gpt_base) { - pr_err("%s: of iomap failed\n", __func__); -- return; -+ goto err_put_np; - } - - gpt_clk = clk_get_sys("gpt0", NULL); -@@ -244,6 +244,8 @@ void __init spear_setup_of_timer(void) - goto err_prepare_enable_clk; - } - -+ of_node_put(np); -+ - spear_clockevent_init(irq); - spear_clocksource_init(); - -@@ -253,4 +255,6 @@ void __init spear_setup_of_timer(void) - clk_put(gpt_clk); - err_iomap: - iounmap(gpt_base); -+err_put_np: -+ of_node_put(np); - } --- -2.35.1 - diff --git a/queue-4.9/mips-lantiq-add-missing-of_node_put-in-irq.c.patch b/queue-4.9/mips-lantiq-add-missing-of_node_put-in-irq.c.patch deleted file mode 100644 index 2413d272dc1..00000000000 --- a/queue-4.9/mips-lantiq-add-missing-of_node_put-in-irq.c.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 1c315afdf95d3009f791d5692315cfbf3edf846a Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Tue, 21 Jun 2022 23:41:25 +0800 -Subject: mips: lantiq: Add missing of_node_put() in irq.c - -From: Liang He - -[ Upstream commit 3748d2185ac4c2c6f80989672253aad909ecaf95 ] - -In icu_of_init(), of_find_compatible_node() will return a node -pointer with refcount incremented. We should use of_node_put() -when it is not used anymore. - -Signed-off-by: Liang He -Signed-off-by: Thomas Bogendoerfer -Signed-off-by: Sasha Levin ---- - arch/mips/lantiq/irq.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/arch/mips/lantiq/irq.c b/arch/mips/lantiq/irq.c -index e64f678ca12c..e29dc58271b2 100644 ---- a/arch/mips/lantiq/irq.c -+++ b/arch/mips/lantiq/irq.c -@@ -460,6 +460,7 @@ int __init icu_of_init(struct device_node *node, struct device_node *parent) - if (!ltq_eiu_membase) - panic("Failed to remap eiu memory"); - } -+ of_node_put(eiu_node); - - return 0; - } --- -2.35.1 - diff --git a/queue-4.9/mips-lantiq-falcon-fix-refcount-leak-bug-in-sysctrl.patch b/queue-4.9/mips-lantiq-falcon-fix-refcount-leak-bug-in-sysctrl.patch deleted file mode 100644 index 489a4751493..00000000000 --- a/queue-4.9/mips-lantiq-falcon-fix-refcount-leak-bug-in-sysctrl.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 08a37afa007c6a1b844d3f214c0bfdaead5c3c8a Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Fri, 17 Jun 2022 20:19:58 +0800 -Subject: mips: lantiq: falcon: Fix refcount leak bug in sysctrl - -From: Liang He - -[ Upstream commit 72a2af539fff975caadd9a4db3f99963569bd9c9 ] - -In ltq_soc_init(), of_find_compatible_node() will return a node pointer -with refcount incremented. We should use of_node_put() when it is not -used anymore. - -Signed-off-by: Liang He -Signed-off-by: Thomas Bogendoerfer -Signed-off-by: Sasha Levin ---- - arch/mips/lantiq/falcon/sysctrl.c | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/arch/mips/lantiq/falcon/sysctrl.c b/arch/mips/lantiq/falcon/sysctrl.c -index 714d92659489..665739bd4190 100644 ---- a/arch/mips/lantiq/falcon/sysctrl.c -+++ b/arch/mips/lantiq/falcon/sysctrl.c -@@ -210,6 +210,12 @@ void __init ltq_soc_init(void) - of_address_to_resource(np_sysgpe, 0, &res_sys[2])) - panic("Failed to get core resources"); - -+ of_node_put(np_status); -+ of_node_put(np_ebu); -+ of_node_put(np_sys1); -+ of_node_put(np_syseth); -+ of_node_put(np_sysgpe); -+ - if ((request_mem_region(res_status.start, resource_size(&res_status), - res_status.name) < 0) || - (request_mem_region(res_ebu.start, resource_size(&res_ebu), --- -2.35.1 - diff --git a/queue-4.9/mips-lantiq-xway-fix-refcount-leak-bug-in-sysctrl.patch b/queue-4.9/mips-lantiq-xway-fix-refcount-leak-bug-in-sysctrl.patch deleted file mode 100644 index 66d38bc55a6..00000000000 --- a/queue-4.9/mips-lantiq-xway-fix-refcount-leak-bug-in-sysctrl.patch +++ /dev/null @@ -1,38 +0,0 @@ -From b3ff2f4b52221161b17864edb6ba5a78b03a3fba Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Fri, 17 Jun 2022 20:25:05 +0800 -Subject: mips: lantiq: xway: Fix refcount leak bug in sysctrl - -From: Liang He - -[ Upstream commit 76695592711ef1e215cc24ed3e1cd857d7fc3098 ] - -In ltq_soc_init(), of_find_compatible_node() will return a node -pointer with refcount incremented. We should use of_node_put() when -it is not used anymore. - -Signed-off-by: Liang He -Signed-off-by: Thomas Bogendoerfer -Signed-off-by: Sasha Levin ---- - arch/mips/lantiq/xway/sysctrl.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/arch/mips/lantiq/xway/sysctrl.c b/arch/mips/lantiq/xway/sysctrl.c -index dd7c36a193e3..6891456a7603 100644 ---- a/arch/mips/lantiq/xway/sysctrl.c -+++ b/arch/mips/lantiq/xway/sysctrl.c -@@ -457,6 +457,10 @@ void __init ltq_soc_init(void) - of_address_to_resource(np_ebu, 0, &res_ebu)) - panic("Failed to get core resources"); - -+ of_node_put(np_pmu); -+ of_node_put(np_cgu); -+ of_node_put(np_ebu); -+ - if (!request_mem_region(res_pmu.start, resource_size(&res_pmu), - res_pmu.name) || - !request_mem_region(res_cgu.start, resource_size(&res_cgu), --- -2.35.1 - diff --git a/queue-4.9/series b/queue-4.9/series index 63f96bd7ae8..eff6cd6723e 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -1,11 +1,6 @@ parisc-ccio-dma-add-missing-iounmap-in-error-path-in.patch cifs-don-t-send-down-the-destination-address-to-sendmsg-for-a-sock_stream.patch -video-fbdev-intelfb-use-aperture-size-from-pci_resou.patch video-fbdev-pxa3xx-gcu-fix-integer-overflow-in-pxa3x.patch -mips-lantiq-falcon-fix-refcount-leak-bug-in-sysctrl.patch -mips-lantiq-xway-fix-refcount-leak-bug-in-sysctrl.patch -mips-lantiq-add-missing-of_node_put-in-irq.c.patch -arm-mach-spear-add-missing-of_node_put-in-time.c.patch wifi-mac80211-fix-uaf-in-ieee80211_scan_rx.patch usb-core-fix-rst-error-in-hub.c.patch alsa-hda-tegra-set-depop-delay-for-tegra.patch diff --git a/queue-4.9/video-fbdev-intelfb-use-aperture-size-from-pci_resou.patch b/queue-4.9/video-fbdev-intelfb-use-aperture-size-from-pci_resou.patch deleted file mode 100644 index f1ee2d770ed..00000000000 --- a/queue-4.9/video-fbdev-intelfb-use-aperture-size-from-pci_resou.patch +++ /dev/null @@ -1,56 +0,0 @@ -From fe558347385f2a003ed12fe5a8807db4fb9148dc Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Fri, 17 Jun 2022 15:38:04 +0200 -Subject: video: fbdev: intelfb: Use aperture size from pci_resource_len - -From: Petr Cvek - -[ Upstream commit 25c9a15fb7bbfafb94dd3b4e3165c18b8e1bd039 ] - -Aperture size for i9x5 variants is determined from PCI base address. - - if (pci_resource_start(pdev, 2) & 0x08000000) - *aperture_size = MB(128); - ... - -This condition is incorrect as 128 MiB address can have the address -set as 0x?8000000 or 0x?0000000. Also the code can be simplified to just -use pci_resource_len(). - -The true settings of the aperture size is in the MSAC register, which -could be used instead. However the value is used only as an info message, -so it doesn't matter. - -Signed-off-by: Petr Cvek -Signed-off-by: Helge Deller -Signed-off-by: Sasha Levin ---- - drivers/video/fbdev/intelfb/intelfbhw.c | 12 +++++------- - 1 file changed, 5 insertions(+), 7 deletions(-) - -diff --git a/drivers/video/fbdev/intelfb/intelfbhw.c b/drivers/video/fbdev/intelfb/intelfbhw.c -index d31ed4e2c46f..3aa93565e935 100644 ---- a/drivers/video/fbdev/intelfb/intelfbhw.c -+++ b/drivers/video/fbdev/intelfb/intelfbhw.c -@@ -199,13 +199,11 @@ int intelfbhw_get_memory(struct pci_dev *pdev, int *aperture_size, - case PCI_DEVICE_ID_INTEL_945GME: - case PCI_DEVICE_ID_INTEL_965G: - case PCI_DEVICE_ID_INTEL_965GM: -- /* 915, 945 and 965 chipsets support a 256MB aperture. -- Aperture size is determined by inspected the -- base address of the aperture. */ -- if (pci_resource_start(pdev, 2) & 0x08000000) -- *aperture_size = MB(128); -- else -- *aperture_size = MB(256); -+ /* -+ * 915, 945 and 965 chipsets support 64MB, 128MB or 256MB -+ * aperture. Determine size from PCI resource length. -+ */ -+ *aperture_size = pci_resource_len(pdev, 2); - break; - default: - if ((tmp & INTEL_GMCH_MEM_MASK) == INTEL_GMCH_MEM_64M) --- -2.35.1 - -- 2.47.3