lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <36b3ef1e2a73f84216d9fa656f6146a6@208suo.com>
Date:   Tue, 18 Jul 2023 16:28:26 +0800
From:   sunran001@...suo.com
To:     joro@...tes.org, will@...nel.org, matthias.bgg@...il.com
Cc:     iommu@...ts.linux.dev, linux-mediatek@...ts.infradead.org,
        linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: [PATCH] iommu/mtk_iommu_v1: add missing put_device()

The of_find_device_by_node() takes a reference to the underlying device
structure, we should release that reference.

./drivers/iommu/mtk_iommu_v1.c:669:3-9: ERROR: missing put_device; call
of_find_device_by_node on line 662, but without a corresponding object
release within this function.

Signed-off-by: Ran Sun <sunran001@...suo.com>
---
  drivers/iommu/mtk_iommu_v1.c | 1 +
  1 file changed, 1 insertion(+)

diff --git a/drivers/iommu/mtk_iommu_v1.c b/drivers/iommu/mtk_iommu_v1.c
index 8a0a5e5d049f..1833d0ce7afe 100644
--- a/drivers/iommu/mtk_iommu_v1.c
+++ b/drivers/iommu/mtk_iommu_v1.c
@@ -666,6 +666,7 @@ static int mtk_iommu_v1_probe(struct platform_device 
*pdev)
          }
          if (!plarbdev->dev.driver) {
              of_node_put(larbnode);
+            put_device(&plarbdev->dev);
              return -EPROBE_DEFER;
          }
          data->larb_imu[i].dev = &plarbdev->dev;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ