From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0A9153346AF; Fri, 9 Jan 2026 12:14:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767960877; cv=none; b=YSPViLurpaQSXv2EqgeFAE301QXK2bSwvn7eQ3Y0mb62ulsDBMvo7N48Jj5ItMVzAYAQDFAIFdMOrF8MRVxIqBeu4XB+rkJQMvzhUOGuFiqDvMEO84uZZtubjU8Rw/JxEgX1HFo7IlXCOljMxvwuY8XlE9F5JohZsEOoe4xkv4w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767960877; c=relaxed/simple; bh=e8YkhYIOJijuLcEf2nJrL6eqDTa/ScPT2htwjbror/U=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=kvDJ6GYhaoBCFl/CXnQVku+WWRabxUvAc6/XN6dhtKnuqW1N/jQDdgWSfzm9SDywx0TodmbZDEs8Ur6b0vM1js5GhPocM0HrclvZn+5GhpyAZ1VmGzdD1PpIbLL+wDkRjnVWoZCGuttn9+Vs7pQfMT9ZEtWvVPm27Ekey3EWbXo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=w3pNey3U; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="w3pNey3U" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8C3D8C4CEF1; Fri, 9 Jan 2026 12:14:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1767960876; bh=e8YkhYIOJijuLcEf2nJrL6eqDTa/ScPT2htwjbror/U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=w3pNey3U0ca9M8jYxrrTYrBYQoNcby1OTM0G7lPGI9cCEDRIBUKFjCptWmySc2N/0 //CQdaASBmhlhpUyGiY2aUxj4zk4612FHkLdeJcri8B/x5hI1UuxR0PDz48N/uEZZg iH90o0lwkg2MLgjpbr6B2d+DGZtmwmhk7S2U0Hqw= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Suman Anna , Robin Murphy , Johan Hovold , Joerg Roedel Subject: [PATCH 6.6 556/737] iommu/omap: fix device leaks on probe_device() Date: Fri, 9 Jan 2026 12:41:35 +0100 Message-ID: <20260109112154.915969442@linuxfoundation.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260109112133.973195406@linuxfoundation.org> References: <20260109112133.973195406@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Johan Hovold commit b5870691065e6bbe6ba0650c0412636c6a239c5a upstream. Make sure to drop the references taken to the iommu platform devices when looking up their driver data during probe_device(). Note that the arch data device pointer added by commit 604629bcb505 ("iommu/omap: add support for late attachment of iommu devices") has never been used. Remove it to underline that the references are not needed. Fixes: 9d5018deec86 ("iommu/omap: Add support to program multiple iommus") Fixes: 7d6827748d54 ("iommu/omap: Fix iommu archdata name for DT-based devices") Cc: stable@vger.kernel.org # 3.18 Cc: Suman Anna Acked-by: Robin Murphy Signed-off-by: Johan Hovold Signed-off-by: Joerg Roedel Signed-off-by: Greg Kroah-Hartman --- drivers/iommu/omap-iommu.c | 2 +- drivers/iommu/omap-iommu.h | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) --- a/drivers/iommu/omap-iommu.c +++ b/drivers/iommu/omap-iommu.c @@ -1681,6 +1681,7 @@ static struct iommu_device *omap_iommu_p } oiommu = platform_get_drvdata(pdev); + put_device(&pdev->dev); if (!oiommu) { of_node_put(np); kfree(arch_data); @@ -1688,7 +1689,6 @@ static struct iommu_device *omap_iommu_p } tmp->iommu_dev = oiommu; - tmp->dev = &pdev->dev; of_node_put(np); } --- a/drivers/iommu/omap-iommu.h +++ b/drivers/iommu/omap-iommu.h @@ -88,7 +88,6 @@ struct omap_iommu { /** * struct omap_iommu_arch_data - omap iommu private data * @iommu_dev: handle of the OMAP iommu device - * @dev: handle of the iommu device * * This is an omap iommu private data object, which binds an iommu user * to its iommu device. This object should be placed at the iommu user's @@ -97,7 +96,6 @@ struct omap_iommu { */ struct omap_iommu_arch_data { struct omap_iommu *iommu_dev; - struct device *dev; }; struct cr_regs {