Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2490200lqp; Sun, 24 Mar 2024 23:18:29 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU2J1zdZIOwOTtQN/9jmznb43a8LAfrwjKGZGg8hwVIYM8T6rf/Bk+n2Y3ovrSVXzhvgWdgLpZY9JEphVqXdutZRg+96c0i2L5GxDlWCw== X-Google-Smtp-Source: AGHT+IFpcccHR7ZlN5xpNd2SZRCRIoi2XcSIHW4a8ghjM9+UHmDddrov91t5Hl0HAzXNSs9gbQtD X-Received: by 2002:a05:6a00:2294:b0:6ea:6def:50a0 with SMTP id f20-20020a056a00229400b006ea6def50a0mr8512578pfe.34.1711347508662; Sun, 24 Mar 2024 23:18:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711347508; cv=pass; d=google.com; s=arc-20160816; b=g30OKoxl/3tOzOJut0GmR8H0TxGxyckBX5u/H+fYPyNQ9bxHeLz0Uq8V4fHRgvdnuC GKlzLKUuATP1ME37DGlcWMNGSNKpLs1MEyKpqiojCtySawFHl33u52JisF8idnc263eB HkWu3YvllUIQZEX//Di9Ls1RIDz5xvz4LP9xw5rywXc0Lnj/NHZG4WoHFaIOsNWP7TE8 1+WNG9i6HZjljmCp5K2B1tvZ2/Aes1FFkgefmVpKjKjWaXlavu5qvgnTTMECe3gWJtTI Wzac7c2peUIA+LnJHFl3AermluEmLaMQ0bc3FOuDSzc2ukdqb2zQzvuYRYO8dDsuJc2n Tu8Q== 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=THznudjgtsrR5bEnAk7lg9b2tllFrgmd/ZqAjR3NPWo63qEv//UvWn4Qgw14BpdfM8 KNavCyy2MAmTDf4h9PQwviy41liyb85TD2yvFnjkNpOrl+zG9pYYSnYzaLxH8lR8OmWS 6RNAqnAVHdy1MsoYYepTB8BcW8/mcWJG/PLo7zK26D4FdWHHU1k+KM11BDJyGYzbGt1e +TIYDr5FVfAPklusoflPMb6KMSJXw22Udtdw/isRotrjTRC1MAdpmPK+jRLYZMFDjOd6 0/JH7y3xVPp5wz7t5mWxe0Aw+/JpwzfAageu8KMYojv4wqSsoIUza4vYBfT9UnUern9V rnsw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QQbM3sXo; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-114577-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-114577-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 y10-20020aa7804a000000b006e7137c1b04si4521406pfm.282.2024.03.24.23.18.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Mar 2024 23:18:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-114577-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=QQbM3sXo; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-114577-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-114577-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 F3CA6291418 for ; Mon, 25 Mar 2024 06:18:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A588529ADF4; Sun, 24 Mar 2024 23:53:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="QQbM3sXo" 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 867E41FDA16; Sun, 24 Mar 2024 23:17:01 +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=1711322222; cv=none; b=Ms/QG3OefXP6FDnb5ABdhn/YQlaklfm08hTJCdhU0DAslBpLwaTeRYBKB0vV8S85fnlWuc+gjRqI5aK5RS0vuqWJqPLXfOxBX08uXBsPvDY79W1xnGiIhalgbschG2QDBDR1JqQ2H25GfzGpvWE46yJukQrwyJPCGIxxHnH5XDM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711322222; c=relaxed/simple; bh=Gd32IM3+MPoIdKqaSx0pqzYfX7z6P6j7xfsNndqjB/8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZE+5mNLat0oJ0Y1BoYGgWHFeqnqZd/6u3VreYUMHmrow2t7kaOrfGOE4xsi8ogkTHvMHEm24XAcghdJWAGG+JWMkQrMjzu/UrJkbGAct3UmrBXgwBS+oLQv1mRpgPKbm2BHDgB3tD1TK71A+Ax5IVfGdrYLzydsE3aIR4uNh2Bk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=QQbM3sXo; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 606DCC43399; Sun, 24 Mar 2024 23:17:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711322221; bh=Gd32IM3+MPoIdKqaSx0pqzYfX7z6P6j7xfsNndqjB/8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QQbM3sXoxp6YS1BuOaDyJ4NnH5g6vYlJWNnwTu+nPXaKldr13v/xyQqGGD8WluAYT JFYIAfRn/mhXRQ7XbcY084mN4Fgfivm893vQCNhZeFL8PRyGI+Jq1i4wGblGVKtB2r B4jhxF+Ii4sQOVNtBXrp0RxXEnb8gy8lmiwFzcdPUmaGPIjUztiMsL1AKJMe8hFbEU 7ic0NQzaqA7zh4sHWOjHylIzqy9n5bE6jQL9exs5oTDw5u/NUSuNtk+/CDHBs351Mo 9uOlEkktPy1z4PNk6otvsRRYWeByuWOWmfyzpPUfV2KPBpoIkHhX3hxdHOAH00nF2R isKaTfgGimMMg== 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.1 301/451] media: imx: csc/scaler: fix v4l2_ctrl_handler memory leak Date: Sun, 24 Mar 2024 19:09:37 -0400 Message-ID: <20240324231207.1351418-302-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324231207.1351418-1-sashal@kernel.org> References: <20240324231207.1351418-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