Loading
drm/amdkfd: Check for potential null return of kmalloc_array()
stable inclusion from stable-v4.19.239 commit 94869bb0de69a812f70231b0eb480bb2f7ae73a6 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IBP16T CVE: CVE-2022-49055 Reference: https://git.kernel.org/stable/c/94869bb0de69a812f70231b0eb480bb2f7ae73a6 -------------------------------- [ Upstream commit ebbb7bb9 ] As the kmalloc_array() may return null, the 'event_waiters[i].wait' would lead to null-pointer dereference. Therefore, it is better to check the return value of kmalloc_array() to avoid this confusion. Signed-off-by:QintaoShen <unSimple1993@163.com> Signed-off-by:
Alex Deucher <alexander.deucher@amd.com> Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
Luo Gengkun <luogengkun2@huawei.com>