Loading
media: venus: hfi: avoid null dereference in deinit
stable inclusion from stable-v4.19.247 commit a21d15dde21d7e8ae047eb8368677407db45d840 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IBP6S3 CVE: CVE-2022-49527 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=a21d15dde21d7e8ae047eb8368677407db45d840 -------------------------------- [ Upstream commit 86594f6a ] If venus_probe fails at pm_runtime_put_sync the error handling first calls hfi_destroy and afterwards hfi_core_deinit. As hfi_destroy sets core->ops to NULL, hfi_core_deinit cannot call the core_deinit function anymore. Avoid this null pointer derefence by skipping the call when necessary. Signed-off-by:Luca Weiss <luca.weiss@fairphone.com> Signed-off-by:
Stanimir Varbanov <stanimir.varbanov@linaro.org> Signed-off-by:
Mauro Carvalho Chehab <mchehab@kernel.org> Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
Liu Shixin <liushixin2@huawei.com>