This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: mediatek: vcodec: Fix encoder access NULL pointer
Author:  Irui Wang <irui.w...@mediatek.com>
Date:    Tue Sep 26 18:19:08 2023 +0800

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 <irui.w...@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno 
<angelogioacchino.delre...@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-ci...@xs4all.nl>

 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);

_______________________________________________
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to