From: Greg Kroah-Hartman Date: Thu, 1 May 2025 07:48:42 +0000 (+0200) Subject: drop some patches from 6.1 and 6.6 based on testing X-Git-Tag: v5.4.293~5 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e967740393f8e49e534d790ae508c1340e6efabe;p=thirdparty%2Fkernel%2Fstable-queue.git drop some patches from 6.1 and 6.6 based on testing --- diff --git a/queue-6.1/memcg-drain-obj-stock-on-cpu-hotplug-teardown.patch b/queue-6.1/memcg-drain-obj-stock-on-cpu-hotplug-teardown.patch deleted file mode 100644 index 97ad124696..0000000000 --- a/queue-6.1/memcg-drain-obj-stock-on-cpu-hotplug-teardown.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 4bf25ac76b51c1ea05eb2dca2dcb3961bf01e1f4 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Mon, 10 Mar 2025 16:09:34 -0700 -Subject: memcg: drain obj stock on cpu hotplug teardown - -From: Shakeel Butt - -[ Upstream commit 9f01b4954490d4ccdbcc2b9be34a9921ceee9cbb ] - -Currently on cpu hotplug teardown, only memcg stock is drained but we -need to drain the obj stock as well otherwise we will miss the stats -accumulated on the target cpu as well as the nr_bytes cached. The stats -include MEMCG_KMEM, NR_SLAB_RECLAIMABLE_B & NR_SLAB_UNRECLAIMABLE_B. In -addition we are leaking reference to struct obj_cgroup object. - -Link: https://lkml.kernel.org/r/20250310230934.2913113-1-shakeel.butt@linux.dev -Fixes: bf4f059954dc ("mm: memcg/slab: obj_cgroup API") -Signed-off-by: Shakeel Butt -Reviewed-by: Roman Gushchin -Acked-by: Johannes Weiner -Cc: Michal Hocko -Cc: Muchun Song -Cc: -Signed-off-by: Andrew Morton -Signed-off-by: Sasha Levin ---- - mm/memcontrol.c | 9 +++++++++ - 1 file changed, 9 insertions(+) - -diff --git a/mm/memcontrol.c b/mm/memcontrol.c -index 3f7cab196eb62..8c586133abb7c 100644 ---- a/mm/memcontrol.c -+++ b/mm/memcontrol.c -@@ -2368,9 +2368,18 @@ static void drain_all_stock(struct mem_cgroup *root_memcg) - static int memcg_hotplug_cpu_dead(unsigned int cpu) - { - struct memcg_stock_pcp *stock; -+ struct obj_cgroup *old; -+ unsigned long flags; - - stock = &per_cpu(memcg_stock, cpu); -+ -+ /* drain_obj_stock requires stock_lock */ -+ local_lock_irqsave(&memcg_stock.stock_lock, flags); -+ old = drain_obj_stock(stock); -+ local_unlock_irqrestore(&memcg_stock.stock_lock, flags); -+ - drain_stock(stock); -+ obj_cgroup_put(old); - - return 0; - } --- -2.39.5 - diff --git a/queue-6.1/series b/queue-6.1/series index d717d5d45b..ef7d2957b0 100644 --- a/queue-6.1/series +++ b/queue-6.1/series @@ -1,5 +1,4 @@ module-sign-with-sha512-instead-of-sha1-by-default.patch -memcg-drain-obj-stock-on-cpu-hotplug-teardown.patch tracing-add-__cpumask-to-denote-a-trace-event-field-.patch tracing-fix-cpumask-example-typo.patch tracing-add-__string_len-example.patch diff --git a/queue-6.6/iommu-handle-race-with-default-domain-setup.patch b/queue-6.6/iommu-handle-race-with-default-domain-setup.patch deleted file mode 100644 index 0aa53a17c5..0000000000 --- a/queue-6.6/iommu-handle-race-with-default-domain-setup.patch +++ /dev/null @@ -1,70 +0,0 @@ -From b46064a18810bad3aea089a79993ca5ea7a3d2b2 Mon Sep 17 00:00:00 2001 -From: Robin Murphy -Date: Fri, 28 Feb 2025 15:46:30 +0000 -Subject: iommu: Handle race with default domain setup - -From: Robin Murphy - -commit b46064a18810bad3aea089a79993ca5ea7a3d2b2 upstream. - -It turns out that deferred default domain creation leaves a subtle -race window during iommu_device_register() wherein a client driver may -asynchronously probe in parallel and get as far as performing DMA API -operations with dma-direct, only to be switched to iommu-dma underfoot -once the default domain attachment finally happens, with obviously -disastrous consequences. Even the wonky of_iommu_configure() path is at -risk, since iommu_fwspec_init() will no longer defer client probe as the -instance ops are (necessarily) already registered, and the "replay" -iommu_probe_device() call can see dev->iommu_group already set and so -think there's nothing to do either. - -Fortunately we already have the right tool in the right place in the -form of iommu_device_use_default_domain(), which just needs to ensure -that said default domain is actually ready to *be* used. Deferring the -client probe shouldn't have too much impact, given that this only -happens while the IOMMU driver is probing, and thus due to kick the -deferred probe list again once it finishes. - -Reported-by: Charan Teja Kalla -Fixes: 98ac73f99bc4 ("iommu: Require a default_domain for all iommu drivers") -Reviewed-by: Jason Gunthorpe -Signed-off-by: Robin Murphy -Link: https://lore.kernel.org/r/e88b94c9b575034a2c98a48b3d383654cbda7902.1740753261.git.robin.murphy@arm.com -Signed-off-by: Joerg Roedel -Signed-off-by: Greg Kroah-Hartman ---- - drivers/iommu/iommu.c | 16 ++++++++++++++++ - 1 file changed, 16 insertions(+) - ---- a/drivers/iommu/iommu.c -+++ b/drivers/iommu/iommu.c -@@ -566,6 +566,17 @@ int iommu_probe_device(struct device *de - mutex_lock(&iommu_probe_device_lock); - ret = __iommu_probe_device(dev, NULL); - mutex_unlock(&iommu_probe_device_lock); -+ -+ /* -+ * The dma_configure replay paths need bus_iommu_probe() to -+ * finish before they can call arch_setup_dma_ops() -+ */ -+ if (IS_ENABLED(CONFIG_IOMMU_DMA) && !ret && dev->iommu_group) { -+ mutex_lock(&dev->iommu_group->mutex); -+ if (!dev->iommu_group->default_domain) -+ ret = -EPROBE_DEFER; -+ mutex_unlock(&dev->iommu_group->mutex); -+ } - if (ret) - return ret; - -@@ -3149,6 +3160,11 @@ int iommu_device_use_default_domain(stru - return 0; - - mutex_lock(&group->mutex); -+ /* We may race against bus_iommu_probe() finalising groups here */ -+ if (IS_ENABLED(CONFIG_IOMMU_DMA) && !group->default_domain) { -+ ret = -EPROBE_DEFER; -+ goto unlock_out; -+ } - if (group->owner_cnt) { - if (group->owner || !iommu_is_default_domain(group) || - !xa_empty(&group->pasid_array)) { diff --git a/queue-6.6/memcg-drain-obj-stock-on-cpu-hotplug-teardown.patch b/queue-6.6/memcg-drain-obj-stock-on-cpu-hotplug-teardown.patch deleted file mode 100644 index 632540026a..0000000000 --- a/queue-6.6/memcg-drain-obj-stock-on-cpu-hotplug-teardown.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 39e286a6981e02a7d95283925a8da6b714a2e347 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Mon, 10 Mar 2025 16:09:34 -0700 -Subject: memcg: drain obj stock on cpu hotplug teardown - -From: Shakeel Butt - -[ Upstream commit 9f01b4954490d4ccdbcc2b9be34a9921ceee9cbb ] - -Currently on cpu hotplug teardown, only memcg stock is drained but we -need to drain the obj stock as well otherwise we will miss the stats -accumulated on the target cpu as well as the nr_bytes cached. The stats -include MEMCG_KMEM, NR_SLAB_RECLAIMABLE_B & NR_SLAB_UNRECLAIMABLE_B. In -addition we are leaking reference to struct obj_cgroup object. - -Link: https://lkml.kernel.org/r/20250310230934.2913113-1-shakeel.butt@linux.dev -Fixes: bf4f059954dc ("mm: memcg/slab: obj_cgroup API") -Signed-off-by: Shakeel Butt -Reviewed-by: Roman Gushchin -Acked-by: Johannes Weiner -Cc: Michal Hocko -Cc: Muchun Song -Cc: -Signed-off-by: Andrew Morton -Signed-off-by: Sasha Levin ---- - mm/memcontrol.c | 9 +++++++++ - 1 file changed, 9 insertions(+) - -diff --git a/mm/memcontrol.c b/mm/memcontrol.c -index 9bf5a69e20d87..ab9afcd372a93 100644 ---- a/mm/memcontrol.c -+++ b/mm/memcontrol.c -@@ -2378,9 +2378,18 @@ static void drain_all_stock(struct mem_cgroup *root_memcg) - static int memcg_hotplug_cpu_dead(unsigned int cpu) - { - struct memcg_stock_pcp *stock; -+ struct obj_cgroup *old; -+ unsigned long flags; - - stock = &per_cpu(memcg_stock, cpu); -+ -+ /* drain_obj_stock requires stock_lock */ -+ local_lock_irqsave(&memcg_stock.stock_lock, flags); -+ old = drain_obj_stock(stock); -+ local_unlock_irqrestore(&memcg_stock.stock_lock, flags); -+ - drain_stock(stock); -+ obj_cgroup_put(old); - - return 0; - } --- -2.39.5 - diff --git a/queue-6.6/series b/queue-6.6/series index d7eea2c514..c6b29b5b0a 100644 --- a/queue-6.6/series +++ b/queue-6.6/series @@ -1,5 +1,4 @@ module-sign-with-sha512-instead-of-sha1-by-default.patch -memcg-drain-obj-stock-on-cpu-hotplug-teardown.patch x86-extable-remove-unused-fixup-type-ex_type_copy.patch x86-mce-use-is_copy_from_user-to-determine-copy-from.patch tracing-add-__string_len-example.patch @@ -192,7 +191,6 @@ net-dsa-mv88e6xxx-fix-atu_move_port_mask-for-6341-family.patch net-dsa-mv88e6xxx-enable-pvt-for-6321-switch.patch net-dsa-mv88e6xxx-enable-.port_set_policy-for-6320-family.patch net-dsa-mv88e6xxx-enable-stu-methods-for-6320-family.patch -iommu-handle-race-with-default-domain-setup.patch mips-cm-fix-warning-if-mips_cm-is-disabled.patch nvme-fixup-scan-failure-for-non-ana-multipath-controllers.patch objtool-ignore-end-of-section-jumps-for-kcov-gcov.patch