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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20220316123452.186166-1-wangxiongfeng2@huawei.com>
Date:   Wed, 16 Mar 2022 20:34:52 +0800
From:   Xiongfeng Wang <wangxiongfeng2@...wei.com>
To:     <tiffany.lin@...iatek.com>, <andrew-ct.chen@...iatek.com>,
        <mchehab@...nel.org>, <matthias.bgg@...il.com>
CC:     <linux-media@...r.kernel.org>,
        <linux-mediatek@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>, <wangxiongfeng2@...wei.com>
Subject: [PATCH -next] media: mtk-vcodec: Add missing of_node_put() in mtk_vdec_hw_prob_done()

of_find_compatible_node() will increment the refcount of the returned
device_node. Calling of_node_put() to avoid the refcount leak.

Signed-off-by: Xiongfeng Wang <wangxiongfeng2@...wei.com>
---
 drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_hw.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_hw.c b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_hw.c
index 8d2a641d92f1..60da59611434 100644
--- a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_hw.c
+++ b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_hw.c
@@ -47,6 +47,8 @@ static int mtk_vdec_hw_prob_done(struct mtk_vcodec_dev *vdec_dev)
 		if (!subdev_node)
 			continue;
 
+		of_node_put(subdev_node);
+
 		hw_idx = (enum mtk_vdec_hw_id)(uintptr_t)of_id->data;
 		if (!test_bit(hw_idx, vdec_dev->subdev_bitmap)) {
 			dev_err(&pdev->dev, "vdec %d is not ready", hw_idx);
-- 
2.20.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ