Commit d8225359 authored by Irui Wang's avatar Irui Wang Committed by Zheng Zengkai
Browse files

media: mediatek: vcodec: Handle invalid encoder vsi

stable inclusion
from stable-v6.6.2
commit a4b31459ce9a85d057ced23f1d67ba8c3def8f88
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8IW7G

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=a4b31459ce9a85d057ced23f1d67ba8c3def8f88



--------------------------------

[ Upstream commit 19e2e01f30b5d2b448b5db097130486ea95af36f ]

Handle invalid encoder vsi in vpu_enc_init to ensure the encoder
vsi is valid for future use.

Fixes: 1972e324 ("media: mediatek: vcodec: Fix possible invalid memory access for encoder")

Signed-off-by: default avatarIrui Wang <irui.wang@mediatek.com>
Reviewed-by: default avatarAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 06620f59
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment