Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2387987lqp; Sun, 24 Mar 2024 17:12:28 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWM7B9N+ziRgD6GeD3HQ0gkLs7Yk0JhDQSGqTy/TJTNKQLPddsF9NMHZZcOvJua9YCOA5XAR6XZ33ZaPjhrfhTL2W9yj+GeFEaCMStbaw== X-Google-Smtp-Source: AGHT+IGlKHN7ab8Glb0FmtbxtnZo4eezMrfskDZ7VNns5FI1nAdLDA8o7XKlHvAqhZiI9I07R6W8 X-Received: by 2002:a17:902:e952:b0:1e0:c571:d644 with SMTP id b18-20020a170902e95200b001e0c571d644mr697691pll.8.1711325548554; Sun, 24 Mar 2024 17:12:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711325548; cv=pass; d=google.com; s=arc-20160816; b=qMbFMfpLB0g4RxVKvWf+IDucyOqc8+goepWl9KJ91LAs1WBCWrtCRjqnLLRGz3j0Ha rMf4meH0lquz8TlghKLPrUpNCJIyCUOMaKBG1aO+ASb5htMM/+OhIdLr5x605ceoRFaw 3wjX1He05Y4pDVYUNUeGMdNkK9ddBO60YlhkrDdZqcuPndeiGITmPHBi0U/LCyvgyaBI Oc5vhpVTKiQKmJVXyrPk0srHxIXK62rhYXbFclYA8RtCBmBwI54KRhJ8KdGxGu+nuykj c7+ehgCZrA0DH2gZ6rrSXxKTHlf0kr8rHCGmtK7rkHpDQEGMM42fle+SttO7HyWiiJ6H BtZw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=mIofL4WnH3qUEewcIjBLDv3eNO2NuzaAmVDyvFB2LGA=; fh=BV5nIM+fRH+C6OnOVxOkDjjtuSYDDVgY4OJrj6N2OIw=; b=Cg6GvJoNfLDpfw10WK8PP0WvkkbZGNsH9V7CyoL67SZPJNRvbKMOUI7dRREXN12vmj MNpNpEeEhIEDOl2mEeNI2U7BcU0aDgGxdG1zMtdM1jL1FNOuAp/RZeZ7yDpwphEfVOCU Z35bTLXYNza9t14BizyaVq0RFGuHYrAo4MT1YKNiPVy0VHr7MA8J/YRSdJ9ZJ1Ow7tyA r4jgmRT3bRKYmmkLge9odUlmC9fL2fiV6rRP/j8CCe9Xvo23ecouBpHMfvZvzg6hQkhu H84huZxkgiTMJDRV2voHmaQa3TQY1sZruHBWWgiR86XLBDaUiKTmkXs6eALNBciihNap HT7Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Nz6W7Pm+; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113329-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113329-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id y1-20020a17090322c100b001e073e45b79si4157976plg.148.2024.03.24.17.12.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Mar 2024 17:12:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-113329-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Nz6W7Pm+; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113329-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113329-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 940CD281B6B for ; Mon, 25 Mar 2024 00:11:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9FFB4195FEB; Sun, 24 Mar 2024 22:42:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Nz6W7Pm+" 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 AD821195FCB; Sun, 24 Mar 2024 22:42:10 +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=1711320130; cv=none; b=I6p1Cl20/xJM2Kn/p00yL7kKSzXQ3xqrMW/VGPkvy0VFm90/+ac03sZvBV+OVheB5GlB1kNYbC1DTSZTqdKr/Jh6ABR8NUAEy2lmzvS4gip3Ozk7jRYtCynsliSW1ofRLnAH3q/XJZONN0KujAO8Xos6hyjTU7TPJgWo9a1v5YU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711320130; c=relaxed/simple; bh=Gd32IM3+MPoIdKqaSx0pqzYfX7z6P6j7xfsNndqjB/8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ix86vmsRW/jVCR3xOCqVHh3ZXkx9I588nvCBgTbrDzkVZof5T/XdAP+y6iZX9nP8lsqpGyZNyPtXR1QO42Dc7fXRY5ac2naHKdfupPEsqC9xWlnbSASuy/3eI74fnWDOGsc3wa+jCxg3miE4SC373qUKMD5qYwgznNEklv4nH6A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Nz6W7Pm+; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id D5B32C433F1; Sun, 24 Mar 2024 22:42:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711320130; bh=Gd32IM3+MPoIdKqaSx0pqzYfX7z6P6j7xfsNndqjB/8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Nz6W7Pm+VJ/fAQu60LLH4otZRu5Tivso8Zq5KfZSUm9L+jhoG62KLyb1hrXWFG5RR zxE0zbYSfWK4mnsDw/u9KfWqsrFhWtbS9k0dwVa8uqEQrfApCeH47xk46NfOPG4u3F PMjdShj23KBvYQMxYQBbuevX5MJBohl7fXMyYK3PMYkOijjBD7F8DvIewEbesgYDcO duybwW+zphTKNwuJ6nZ8XAalIhiHUXIKeyFV4Uwea9nFV1BlRBSPv7UI4XmNTIb+E5 TQsDhUDsDjuk9y0/9jOKnBUiLR3Pqa9sAsqNO08rOuQP/EeLfrbt/rIu4pKWoikQoP +UmIaQ0gRYOeQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Lucas Stach , Philipp Zabel , Hans Verkuil , Sasha Levin Subject: [PATCH 6.8 438/715] media: imx: csc/scaler: fix v4l2_ctrl_handler memory leak Date: Sun, 24 Mar 2024 18:30:17 -0400 Message-ID: <20240324223455.1342824-439-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324223455.1342824-1-sashal@kernel.org> References: <20240324223455.1342824-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Lucas Stach [ Upstream commit 4797a3dd46f220e6d83daf54d70c5b33db6deb01 ] Free the memory allocated in v4l2_ctrl_handler_init on release. Fixes: a8ef0488cc59 ("media: imx: add csc/scaler mem2mem device") Signed-off-by: Lucas Stach Reviewed-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Sasha Levin --- drivers/staging/media/imx/imx-media-csc-scaler.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/media/imx/imx-media-csc-scaler.c b/drivers/staging/media/imx/imx-media-csc-scaler.c index 1fd39a2fca98a..95cca281e8a37 100644 --- a/drivers/staging/media/imx/imx-media-csc-scaler.c +++ b/drivers/staging/media/imx/imx-media-csc-scaler.c @@ -803,6 +803,7 @@ static int ipu_csc_scaler_release(struct file *file) dev_dbg(priv->dev, "Releasing instance %p\n", ctx); + v4l2_ctrl_handler_free(&ctx->ctrl_hdlr); v4l2_m2m_ctx_release(ctx->fh.m2m_ctx); v4l2_fh_del(&ctx->fh); v4l2_fh_exit(&ctx->fh); -- 2.43.0