commit | 7cbcf826ea2138d5e4463f0ad8124b9ae5023b3a | [log] [tgz] |
---|---|---|
author | Yunfei Dong <yunfei.dong@mediatek.com> | Thu Feb 22 09:26:09 2024 |
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | Tue Feb 27 07:07:20 2024 |
tree | 8bd3387074b3ce71138068ae0875664209671424 | |
parent | 5acef195f5421c37fe14103723b0431e6f2fea93 [diff] |
FROMLIST: media: mediatek: vcodec: adding lock to protect encoder context list The ctx_list will be deleted when scp getting unexpected behavior, then the ctx_list->next will be NULL, the kernel driver maybe access NULL pointer in function vpu_enc_ipi_handler when going through each context, then reboot. Need to add lock to protect the ctx_list to make sure the ctx_list->next isn't NULL pointer. Fixes: 1972e32431ed ("media: mediatek: vcodec: Fix possible invalid memory access for encoder") Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> (am from https://patchwork.linuxtv.org/patch/99300/) (also found at https://lore.kernel.org/r/20240222092609.31382-3-yunfei.dong@mediatek.com) BUG=b:317459192 TEST=emerge-jacuzzi chromeos-kernel-5-10 UPSTREAM-TASK=b:326854739 Change-Id: I98bfac7386fd101a6d97b862a00dc20c6347ecb4 Signed-off-by: Pin-yen Lin <treapking@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5321187 Reviewed-by: Fei Shao <fshao@chromium.org> Reviewed-by: Sean Paul <sean@poorly.run> (cherry picked from commit 1f399dabcba2eb11607359aecb3984e9366c76d9) Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5323586