Received: by 2002:a05:7412:518d:b0:e2:908c:2ebd with SMTP id fn13csp368602rdb; Thu, 5 Oct 2023 08:13:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG077DuTg5pIDK13lIvoUKIQ3gTRzUOkhMOegZ9hX7s07pcwbMr4QYxQkXUDJO1MT8N50Tu X-Received: by 2002:a17:903:110d:b0:1c7:37e2:13ff with SMTP id n13-20020a170903110d00b001c737e213ffmr5586867plh.6.1696518829618; Thu, 05 Oct 2023 08:13:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696518829; cv=none; d=google.com; s=arc-20160816; b=Zv7VFLADNTuW67uhxYeVaArB6SIC2cJ3DjgPBIZorwwUKa3xCuAYlUFNd3vnzB3R8Z 9/gd+LgZg8hXvq6VEbQYMgoXcNG4BdJT+aeODlz+uCX8Kp1ucK8qMLWJYv74An1i3I8S p8gcGAo622vX9aPX11nkPU/zC/1n1QdpZfw2YVrdBPOViuKp9/uu4lm51T7wH4QAYphK 0J8A08uNHayaELEv13A/CtvWIiZLgnippno81oEDORmUPy2Pe3Hb7vsSBi1LHchP/fUU HpRSxUfaC4bzGnz71yIx7qv+gPmhp6iRBbMg4NTAmFltIAxl7Wf6915sgaJ0LV664n5W HhiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:references :cc:to:from:content-language:subject:user-agent:mime-version:date :message-id; bh=z+vM+2eok4AC4+e7hiNzHtbEfo28spSIzsZ5rR7YFM4=; fh=yEPyaNN5qw4o7iT/cY4oB1pHIr+Atbb/lZlSKjr/SkU=; b=xREDNj3yDeOlGSgwMHqYQhwF+zOPNMDSX7jQAEwK/2IAXPFjHm8YzLRikcHON2YPP9 cLJna+GKoZ9jpQUkVi7uYpj+9d/TJMtsSnfDQ35WD1OI7dDTrPKg2EzA5PTn/C6HrTJi QzUIWbeUBB1xNA6a0TAWZrw7DP6Vp2k/VnuDKZZLoAwfsr0hr1HXihH7EaELHq7cmF2f q8OeBxOM6cMeYui5YYqRVhwgXDSQqXcdozr5IGFiwQiof7Z21b8t2hs6wctWypxVNYB1 YxM9MvTypSm2zuB7dTAdBaygfOFocx22n5VIBt4PVuOYJhGA9duMtQ/K235BvNaJ2Yd+ tiNg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=xs4all.nl Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id b16-20020a170903229000b001c6249a387esi1732617plh.531.2023.10.05.08.13.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Oct 2023 08:13:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=xs4all.nl Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 7C33682369D4; Thu, 5 Oct 2023 08:13:36 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230463AbjJEPMj (ORCPT + 99 others); Thu, 5 Oct 2023 11:12:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234389AbjJEPLa (ORCPT ); Thu, 5 Oct 2023 11:11:30 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD0F88E93; Thu, 5 Oct 2023 07:42:31 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E053EC116B0; Thu, 5 Oct 2023 08:46:13 +0000 (UTC) Message-ID: Date: Thu, 5 Oct 2023 10:46:12 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/2] media: mediatek: vcodec: Fix encoder access NULL pointer Content-Language: en-US, nl From: Hans Verkuil To: Irui Wang , Mauro Carvalho Chehab , Matthias Brugger , angelogioacchino.delregno@collabora.com, nicolas.dufresne@collabora.com, Yunfei Dong Cc: Project_Global_Chrome_Upstream_Group@mediatek.com, linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Maoguang Meng References: <20230926101909.15030-1-irui.wang@mediatek.com> <36356e37-9abd-4dec-a716-9822b67bd0fa@xs4all.nl> <54962983-fa23-4ecc-9874-f59a1387cf70@xs4all.nl> In-Reply-To: <54962983-fa23-4ecc-9874-f59a1387cf70@xs4all.nl> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Thu, 05 Oct 2023 08:13:36 -0700 (PDT) On 04/10/2023 08:54, Hans Verkuil wrote: > Ping! Is this a fix for 6.6 or not? > > Regards, > > Hans > > On 02/10/2023 12:24, Hans Verkuil wrote: >> On 26/09/2023 12:19, Irui Wang wrote: >>> Need to set the private data with encoder device, or will access >>> NULL pointer in encoder handler. >>> >>> Fixes: 1972e32431ed ("media: mediatek: vcodec: Fix possible invalid memory access for encoder") >>> >>> Signed-off-by: Irui Wang >>> --- >>> drivers/media/platform/mediatek/vcodec/encoder/venc_vpu_if.c | 3 ++- >>> 1 file changed, 2 insertions(+), 1 deletion(-) >>> >>> diff --git a/drivers/media/platform/mediatek/vcodec/encoder/venc_vpu_if.c b/drivers/media/platform/mediatek/vcodec/encoder/venc_vpu_if.c >>> index d299cc2962a5..ae6290d28f8e 100644 >>> --- a/drivers/media/platform/mediatek/vcodec/encoder/venc_vpu_if.c >>> +++ b/drivers/media/platform/mediatek/vcodec/encoder/venc_vpu_if.c >>> @@ -138,7 +138,8 @@ int vpu_enc_init(struct venc_vpu_inst *vpu) >>> vpu->ctx->vpu_inst = vpu; >>> >>> status = mtk_vcodec_fw_ipi_register(vpu->ctx->dev->fw_handler, vpu->id, >>> - vpu_enc_ipi_handler, "venc", NULL); >>> + vpu_enc_ipi_handler, "venc", >>> + vpu->ctx->dev); >>> >>> if (status) { >>> mtk_venc_err(vpu->ctx, "vpu_ipi_register fail %d", status); >> >> Is this a fix that should go to 6.6? This looks like a real bug, so I'll queue this up for 6.6. Regards, Hans