Message ID | 20231122-rkisp-fixes-v1-2-1958af371e39@ideasonboard.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2b07:b0:403:3b70:6f57 with SMTP id io7csp1372047vqb; Wed, 22 Nov 2023 06:43:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IFyXqXzr885ovYpV+E+TKFr7h6uJ5sVtlazmUYl+N2yq8HJxngp5ptnVzVpVopDswDKxFxd X-Received: by 2002:a17:903:1252:b0:1cc:6d2c:fb59 with SMTP id u18-20020a170903125200b001cc6d2cfb59mr2557851plh.28.1700664194866; Wed, 22 Nov 2023 06:43:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700664194; cv=none; d=google.com; s=arc-20160816; b=X45jkC6j1+aLvIJmxpdbgNdKXJZ5rafWJaEPWZohCI4jP/8Bbus0pvAX5UTe7e11BE hlSwkUj/8Yqwm42bP/2piMroQtkTCaTM9Veu5gx6iebQp87xiIXHLJebrLKdVLyswl8B rzMYiF69eqtEECR44R8XklBM+ifErD69bcxyxGkbDAM3qJTawtIGeCiyiWBOW544Thjg 217E2nWqHu1kZ14lgpkAyXj1vMDS3jFex0BEAlvMJ9Q7i0GkQnmALZvUANWu+xi2yS46 hA2TAuhePYeERZK9xR+o1vHTJ3iTOBV+QXERYXVRjGbZMeDsk5DO5Q9Up+NoNHyAy5X8 cIqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=tH+DXzwq0CXRbhhdUmqx9lc05IjeGn0cf20XR7rdfSI=; fh=e2+FywPT74OKeNAVnhPDEB5sc4CoF2aRKIHvw6X2EL4=; b=qXPO9cI584AM1xq0JIL8nvurMnQFxPql+5My8SyUNBncVkFE9uCZrJZG3ctyRYf55g rqxyi+EpFA6ds2k5/sxX8ut4BdhMJ6aUKMUroTihN2RGNDc9ttQqpPYQFCPQR6RnQVme VMD1zZbzMp+wxNSLWIcax/QbBoYw14PTeuofHlStcCpXuP7gtXn+zgb1OzLGSKsfOwdl SLB2b3T2z2JUfdkdVWBEuEHM1sV5KAODehvBrTcKhiRxDds0dBbZH8f7n8lYp8r0Qoma BnCD6Ab+loL00pUc6XTZFyegjxSgPMM0CseRbR6lGAgK3yquw/Cgl+CBm9vTwNDZnYf5 +bTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=spfS8koB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id m13-20020a170902db0d00b001cf64c06394si5818931plx.556.2023.11.22.06.43.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 06:43:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=spfS8koB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 8CB7B81DA3B4; Wed, 22 Nov 2023 06:43:13 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343864AbjKVOnE (ORCPT <rfc822;ouuuleilei@gmail.com> + 99 others); Wed, 22 Nov 2023 09:43:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232313AbjKVOm5 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 22 Nov 2023 09:42:57 -0500 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C6257112; Wed, 22 Nov 2023 06:42:53 -0800 (PST) Received: from [127.0.1.1] (91-158-149-209.elisa-laajakaista.fi [91.158.149.209]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 79BB66EF; Wed, 22 Nov 2023 15:42:18 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1700664139; bh=wDApJOipWXJ+xO5p79TRPJampy6N0curdFUvhOlG9C8=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=spfS8koB6mCbx7EhQk1ISAX2p3QSybUi0pbr19778oBsJflJ0yThy5u5r5t71CLZQ jEoucs1JkhRIbFdu3ilEeFBOLfaQKl4kSvtxdS9OHr0UIfA5g85pk+oPu+3aLkV6Mi IdwjQOMOFsNsAswnIfMz7SvJ9PN4f4djMHyIMcfY= From: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Date: Wed, 22 Nov 2023 16:42:23 +0200 Subject: [PATCH 2/2] media: rkisp1: Fix memory leaks in rkisp1_isp_unregister() MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20231122-rkisp-fixes-v1-2-1958af371e39@ideasonboard.com> References: <20231122-rkisp-fixes-v1-0-1958af371e39@ideasonboard.com> In-Reply-To: <20231122-rkisp-fixes-v1-0-1958af371e39@ideasonboard.com> To: Dafna Hirschfeld <dafna@fastmail.com>, Laurent Pinchart <laurent.pinchart@ideasonboard.com>, Mauro Carvalho Chehab <mchehab@kernel.org>, Heiko Stuebner <heiko@sntech.de>, Jacob Chen <jacob2.chen@rock-chips.com>, Yichong Zhong <zyc@rock-chips.com>, Shunqian Zheng <zhengsq@rock-chips.com>, Paul Elder <paul.elder@ideasonboard.com>, Sakari Ailus <sakari.ailus@linux.intel.com> Cc: Kieran Bingham <kieran.bingham@ideasonboard.com>, Hans Verkuil <hverkuil-cisco@xs4all.nl>, Eddie Cai <eddie.cai.linux@gmail.com>, Allon Huang <allon.huang@rock-chips.com>, Jeffy Chen <jeffy.chen@rock-chips.com>, linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=818; i=tomi.valkeinen@ideasonboard.com; h=from:subject:message-id; bh=wDApJOipWXJ+xO5p79TRPJampy6N0curdFUvhOlG9C8=; b=owEBbQKS/ZANAwAIAfo9qoy8lh71AcsmYgBlXhNmgT8hYQq0m2LhNw8VE3d0LARdJLpZ7YXOc 3uaZhEN2WmJAjMEAAEIAB0WIQTEOAw+ll79gQef86f6PaqMvJYe9QUCZV4TZgAKCRD6PaqMvJYe 9WGNEACKacCv9FjzmAG3l2lCX0fir2y+MhLqtxC1Jsnj7YopQk4rTwfSQzZXg9PEfiy2f4fSflN 28bMxNG9sr34UIWHOBeyNAxD2Xb8AN3cuok6AIj991pdsMcA88h8nWxb72fnXGu3AzAyx/HtTOz r5qdofYP2p4eu2JfBNVAOaVaiUw6xIbO2c52fm2GFjGjSEhgQtLBGBNiyrMlBlLlcGwSVnDUJpx ajoy3/UItSDX+EJYmf15AxlDNIjuki7C/WgkczFq/keNxOyOBZ1O+PC5tf3Ku8FiIw15sK7VxiC jm5YurJpFkCawaNvDTtAbnjbw3HEQp40cuj/gSfw/fuA6SwtVJKYbTmHEluebdyheBmzwuR+tZf lwbZQNLpmhVuSU1JoLsu18A6TD47IiCmwx0UPhOlaMWmL7L2XS6iknsBGqg2aYbXzb/fmMqzm3x Q1wRCbiLENJS+sJs3jc07Tahuvvo1dvAMUpqChhx4ffxljxXuIlqq+ki7ANcf6BfA2b3hs7ahaw 35p1vtea7ygv0vwaPGPRt65L8EIagUeZVJuL4o6r3DKhL+ll0FPZb32rjn6J9onvNmcuVFfD5dj RMIO+y/lGcJFpQVnsHFoJuxq1dBSQCITMzxc0ACIGuWMrPpWIIwgNppHEtOXb+MLiSgv/tqOg3d BRwiyZMnnVf5m8A== X-Developer-Key: i=tomi.valkeinen@ideasonboard.com; a=openpgp; fpr=C4380C3E965EFD81079FF3A7FA3DAA8CBC961EF5 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 22 Nov 2023 06:43:13 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783275658519826214 X-GMAIL-MSGID: 1783275658519826214 |
Series |
media: rkisp1: Fix memory leaks
|
|
Commit Message
Tomi Valkeinen
Nov. 22, 2023, 2:42 p.m. UTC
Add missing call to v4l2_subdev_cleanup() to fix memory leak.
Fixes: 2cce0a369dbd ("media: rkisp1: isp: Use V4L2 subdev active state")
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
---
drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c | 1 +
1 file changed, 1 insertion(+)
Comments
Hi Tomi, On Wed, Nov 22, 2023 at 04:42:23PM +0200, Tomi Valkeinen wrote: > Add missing call to v4l2_subdev_cleanup() to fix memory leak. > > Fixes: 2cce0a369dbd ("media: rkisp1: isp: Use V4L2 subdev active state") > Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> > --- > drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c > index 88ca8b2283b7..45d1ab96fc6e 100644 > --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c > +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c > @@ -933,6 +933,7 @@ void rkisp1_isp_unregister(struct rkisp1_device *rkisp1) > return; > > v4l2_device_unregister_subdev(&isp->sd); > + v4l2_subdev_cleanup(&isp->sd); > media_entity_cleanup(&isp->sd.entity); > } > > > -- > 2.34.1 > > Reviewed-by: Tommaso Merciai <tomm.merciai@gmail.com> Thanks & Regards, Tommaso
Hi Tomi, Thank you for the patch. On Wed, Nov 22, 2023 at 04:42:23PM +0200, Tomi Valkeinen wrote: > Add missing call to v4l2_subdev_cleanup() to fix memory leak. > > Fixes: 2cce0a369dbd ("media: rkisp1: isp: Use V4L2 subdev active state") > Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > --- > drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c > index 88ca8b2283b7..45d1ab96fc6e 100644 > --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c > +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c > @@ -933,6 +933,7 @@ void rkisp1_isp_unregister(struct rkisp1_device *rkisp1) > return; > > v4l2_device_unregister_subdev(&isp->sd); > + v4l2_subdev_cleanup(&isp->sd); > media_entity_cleanup(&isp->sd.entity); > } >
diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c index 88ca8b2283b7..45d1ab96fc6e 100644 --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c @@ -933,6 +933,7 @@ void rkisp1_isp_unregister(struct rkisp1_device *rkisp1) return; v4l2_device_unregister_subdev(&isp->sd); + v4l2_subdev_cleanup(&isp->sd); media_entity_cleanup(&isp->sd.entity); }