Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp1233991rdb; Mon, 2 Oct 2023 03:34:47 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGp/BMmry8iYd7ZeCWeyFg8NmV0l9e1qjJuEdKVWDuEXGVVt84kJeOXpQ8RPsQzfIJVKXq7 X-Received: by 2002:a05:6870:a693:b0:1b3:9e41:de07 with SMTP id i19-20020a056870a69300b001b39e41de07mr13600783oam.36.1696242887073; Mon, 02 Oct 2023 03:34:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696242887; cv=none; d=google.com; s=arc-20160816; b=BTF7Ce1+LtANDTwTMS1SaB4wk5e7hCRi3npzu8oA+vmN8PUVDJKjJqmixSNAEkoMTf KdyHO6GogJI4kN1E8tQUL/zHz3cJIHFXqjJWL+kNameTjlWNsGdp9FDVbrNhYRoKYP8J 8LeR13QpH6J0RNpCXpWV16wPJcwtutxx9pWmFassmSG0sFHJwTiSXPeM4+eZijCp2KRX NULtALbeq8FmNUTVALk8n6eXicjK4JtM0W6goSS9f8rAo8WM66G6RgtGmgR1S/nT5AgX CxlTiV40folhQqDIzLUtFg77AV6a40xP127yXrB3UQavB1V08Ba6KGj3cpwtmiEp/uP+ 9Wyg== 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:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=UX6DonogsvAFibyOJXDu+0124Nc4V6u68XG3y31lZ1A=; fh=yEPyaNN5qw4o7iT/cY4oB1pHIr+Atbb/lZlSKjr/SkU=; b=ul7jHc2ixtGPnENYEDFodM7U9NMs3eaYv0e/EseLWunvnnrJtYP/Ejf1wf9XAxSXqT 89DK7d+3CI3MFw4S7O0EzLqs1xX6k84dG+UvJlKv1+345AYgU1gDWQg1y+H9POx/guU2 FhdhIvGRsZmAs7yMhUAPnJAJph1e0yzeddhACkcyGzK35OQj7QMIPIpKRY3QEpGxqY88 GGjuGnywAfsrOWl0xAxvNJUPrL9BoC6/cvpH6XMa3EjyReyfyNqgbJbR9kA9iZsqT3AR GCBBjE8X8ub6gEF1iLPRHBDuRH7/fRJXCHTDuhWUXiwChIjsqBbt//xhu2PwPKAN2n2j VO/w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id z125-20020a633383000000b0057d08dac754si14885371pgz.671.2023.10.02.03.34.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 03:34:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (Postfix) with ESMTP id DBC3D80A415F; Mon, 2 Oct 2023 03:24:19 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236438AbjJBKYM (ORCPT + 99 others); Mon, 2 Oct 2023 06:24:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55200 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236367AbjJBKYJ (ORCPT ); Mon, 2 Oct 2023 06:24:09 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B49990; Mon, 2 Oct 2023 03:24:06 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 094FEC433C8; Mon, 2 Oct 2023 10:24:02 +0000 (UTC) Message-ID: <36356e37-9abd-4dec-a716-9822b67bd0fa@xs4all.nl> Date: Mon, 2 Oct 2023 12:24:01 +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 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> From: Hans Verkuil In-Reply-To: <20230926101909.15030-1-irui.wang@mediatek.com> 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 groat.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 (groat.vger.email [0.0.0.0]); Mon, 02 Oct 2023 03:24:20 -0700 (PDT) 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? Regards, Hans