Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2507331lqp; Mon, 25 Mar 2024 00:14:13 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU6iTepvVqQB7HFBT8Qk0J4PcdmekGWO3ZWnchHrmSUAo+UY2iv1jEob+3h5QGexOeHyWW5y+XyE0WeDSgDKcfRrOP+t382xWLrLrVsaA== X-Google-Smtp-Source: AGHT+IEwAsWyFs6J59PyI7T4JyaWtvvt/9yGXwqGgz8tEHTvBbFnjoOO72uNXhkOgIv4C7lF9fNn X-Received: by 2002:a05:6a20:d394:b0:1a3:c305:a8eb with SMTP id iq20-20020a056a20d39400b001a3c305a8ebmr4697302pzb.53.1711350852719; Mon, 25 Mar 2024 00:14:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711350852; cv=pass; d=google.com; s=arc-20160816; b=MEbcgUiM+tfZCtJZzDDxuCD68jrXMT7+GjhT2rdEoIhZZOBmBmDP88ftexLFY533wM wf5uSfW3XnuQL8+9/OnM+vcvDdlcKiszNe4vFP31q7kRViGA+Ps1M4753lfCzHU140Bj GDFZp8XCRcTiWmPht6ILyJ6qLLIDW9uDqJjuSbRqsxycZWAoldgCDqFAnri28cs8tQKV 4eP3kpI5dKViEwqnMdgalL/pts8mZayY4MtdI5Y+Ze2O61r8KIIK7yWj/h4Yuu3fV43n 39lefUjGMKoOslFV+fyogAecawdJPEs8xAPTVDUGSRj3lHcFvfbma9L9df1gSOHANSve K9EQ== 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=v94uugl2G4byb83DPxufbu0C7tEPZCnH0V2eecHwhsg=; fh=BV5nIM+fRH+C6OnOVxOkDjjtuSYDDVgY4OJrj6N2OIw=; b=HHvCyLFN0SSX9VPlfQtGxODDXP1eBCAcaPmj04SRgUIBKXcW70g3RCIQ+kvXvPsSf7 K5FkdMd3JunYsYmf6Fxow1HoVZotDFWDacRV1ImZFSjbTMthrcFT4hyzo1fwrc3BRVNe 7bFO7AZidDvscRLw4lAFMnvCLs7JLINHav9VrMsKjv9o9/54jWVBqCnMFystk2ze4dTb u6UiLzcSguo23++3cKMMiZSV8KCTqu1wHYkNzQLCHKOoCQ231NkoiKjGpxnT3y0ZQeZO uBmcGf1McBKUVH7y3kbQKcx7emBSLdYh517NQL7ZbU77k/B49pasbfCSDprEgEFGKz8f MNUw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nd8YSegg; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-115014-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-115014-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. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id h13-20020a170902680d00b001dca62297afsi4363640plk.6.2024.03.25.00.14.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 00:14:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-115014-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nd8YSegg; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-115014-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-115014-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 62A462A2260 for ; Mon, 25 Mar 2024 07:14:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 24E8A284D80; Mon, 25 Mar 2024 00:59:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="nd8YSegg" 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 7A4F917AF97; Sun, 24 Mar 2024 23:42:58 +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=1711323779; cv=none; b=AmZH+z0HR69AGhc46ObCUbW2ugyxBLepvDTQgXwSFMK49xzIiCwMxOn4iQZfG3XB45ny+FRumPYnhIpWDHuWQHF147R7KiBJ93llAjk/qoMPmvZsFGU7xkqYM9qnrGCUFg40ahr7DyzbPTDEvPuatQer0JOEUpvqlyBnwhYuMWw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711323779; c=relaxed/simple; bh=Yjr34TEgyp7PzJaC3I+2zo5LTxg0MGz/MCnfuX7bBrE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=BFHIFh5+dfQVcqGqDzK2G+kdRzaLmpm1Po0yhHKGZSPEOWYxXuym8/0b/UZHRCZEVn6Hwl9itFqRkRgdUZ+7p0RVMCQrlQb7r55NUI0+LSMWmIvpN99nBZCneEmdDajoy4cyz9oknNVVgpCAGqVumQrFCqsGZPgK//5NZAYzvjs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=nd8YSegg; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id A7B41C43390; Sun, 24 Mar 2024 23:42:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711323778; bh=Yjr34TEgyp7PzJaC3I+2zo5LTxg0MGz/MCnfuX7bBrE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nd8YSegg7SFa63979CKMDGNWhszdExIMEztbL/j6hXyei+3v8lUOflyj8SnYBk665 fog/K+ti74oL8H/SFCJc6GyyDjpgER4nct08uQq2NuPaN3U3Ehvl10e66iKJuOSGC/ r57UOgrKzH/x8R0CURBVuLibPS7YPhnofvPiJEOz0rOim1cN2c4y+tBAkJIWRMlyCy qAsI4hPmCaDz+5nKeGp328bPvteoPlyRXReRs+CQbS2CjC3ZHFQXR6XLyHSlTK3VPj ujXB9YC6xEd6SFuTMTTfnoCoQlMkI3Wk5b4Df9AEn3ZDb7fsqz/bOenyHwejyurP7N U08oxskwA6KNw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Lucas Stach , Philipp Zabel , Hans Verkuil , Sasha Levin Subject: [PATCH 5.10 154/238] media: imx: csc/scaler: fix v4l2_ctrl_handler memory leak Date: Sun, 24 Mar 2024 19:39:02 -0400 Message-ID: <20240324234027.1354210-155-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324234027.1354210-1-sashal@kernel.org> References: <20240324234027.1354210-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 63a0204502a8b..939843b895440 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