From: Sasha Levin Date: Sun, 21 May 2023 23:35:44 +0000 (-0400) Subject: Drop iommu-arm-smmu-drop-if-with-an-always-false-conditio.patch X-Git-Tag: v6.3.4~38 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=df3492d5ab72ddc2d5b97bba3c86711440670477;p=thirdparty%2Fkernel%2Fstable-queue.git Drop iommu-arm-smmu-drop-if-with-an-always-false-conditio.patch Signed-off-by: Sasha Levin --- diff --git a/queue-6.3/iommu-arm-smmu-drop-if-with-an-always-false-conditio.patch b/queue-6.3/iommu-arm-smmu-drop-if-with-an-always-false-conditio.patch deleted file mode 100644 index 5ffbc2e99ef..00000000000 --- a/queue-6.3/iommu-arm-smmu-drop-if-with-an-always-false-conditio.patch +++ /dev/null @@ -1,59 +0,0 @@ -From c49e0f94bc7fbd3d7b92b32e67876ec281cf8ab8 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Tue, 21 Mar 2023 09:41:16 +0100 -Subject: iommu/arm-smmu: Drop if with an always false condition -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -From: Uwe Kleine-König - -[ Upstream commit a2972cb89935160bfe515b15d28a77694723ac06 ] - -The remove and shutdown callback are only called after probe completed -successfully. In this case platform_set_drvdata() was called with a -non-NULL argument and so smmu is never NULL. Other functions in this -driver also don't check for smmu being non-NULL before using it. - -Also note that returning an error code from a remove callback doesn't -result in the device staying bound. It's still removed and devm allocated -resources are freed (among others *smmu and the register mapping). So -after an early exit to iommu device stayed around and using it probably -oopses. - -Signed-off-by: Uwe Kleine-König -Reviewed-by: Robin Murphy -Link: https://lore.kernel.org/r/20230321084125.337021-2-u.kleine-koenig@pengutronix.de -Signed-off-by: Joerg Roedel -Signed-off-by: Sasha Levin ---- - drivers/iommu/arm/arm-smmu/arm-smmu.c | 6 ------ - 1 file changed, 6 deletions(-) - -diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu.c b/drivers/iommu/arm/arm-smmu/arm-smmu.c -index 2ff7a72cf3772..f4a36533ae478 100644 ---- a/drivers/iommu/arm/arm-smmu/arm-smmu.c -+++ b/drivers/iommu/arm/arm-smmu/arm-smmu.c -@@ -2195,9 +2195,6 @@ static void arm_smmu_device_shutdown(struct platform_device *pdev) - { - struct arm_smmu_device *smmu = platform_get_drvdata(pdev); - -- if (!smmu) -- return; -- - if (!bitmap_empty(smmu->context_map, ARM_SMMU_MAX_CBS)) - dev_notice(&pdev->dev, "disabling translation\n"); - -@@ -2218,9 +2215,6 @@ static int arm_smmu_device_remove(struct platform_device *pdev) - { - struct arm_smmu_device *smmu = platform_get_drvdata(pdev); - -- if (!smmu) -- return -ENODEV; -- - iommu_device_unregister(&smmu->iommu); - iommu_device_sysfs_remove(&smmu->iommu); - --- -2.39.2 - diff --git a/queue-6.3/series b/queue-6.3/series index 6a76d3a9b08..5427015521f 100644 --- a/queue-6.3/series +++ b/queue-6.3/series @@ -180,7 +180,6 @@ fs-ntfs3-add-length-check-in-indx_get_root.patch fs-ntfs3-fix-a-possible-null-pointer-dereference-in-.patch clk-tegra20-fix-gcc-7-constant-overflow-warning.patch iommu-arm-smmu-v3-acknowledge-pri-event-queue-overfl.patch -iommu-arm-smmu-drop-if-with-an-always-false-conditio.patch iommu-sprd-release-dma-buffer-to-avoid-memory-leak.patch power-supply-axp288_charger-use-alt-usb-id-extcon-on.patch input-xpad-add-constants-for-gip-interface-numbers.patch