summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/msm/msm_io_utils.c
diff options
context:
space:
mode:
authorHuiwen He <hehuiwen@kylinos.cn>2025-11-13 01:19:47 +0800
committerRob Clark <rob.clark@oss.qualcomm.com>2025-11-17 09:43:58 -0800
commit3065e6a4d3594b42dae6176b3e2c0c3563cf94b8 (patch)
treee4e9cd12b6e65f0e0c35bbd32772f8f945194ece /drivers/gpu/drm/msm/msm_io_utils.c
parent3099e0247e3217e1b39c1c61766e06ec3d13835f (diff)
drm/msm: fix missing NULL check after kcalloc in crashstate_get_bos()
The crashstate_get_bos() function allocates memory for `state->bos` using kcalloc(), but the vmbind path does not check for allocation failure before dereferencing it in the following drm_gpuvm_for_each_va() loop. This could lead to a NULL pointer dereference if memory allocation fails. Fix this by wrapping the drm_gpuvm_for_each_va() loop with a NULL check on state->bos, similar to the safety check in the non-vmbind path. Fixes: af9aa6f316b3d ("drm/msm: Crashdump support for sparse") Signed-off-by: Huiwen He <hehuiwen@kylinos.cn> Patchwork: https://patchwork.freedesktop.org/patch/687556/ Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com>
Diffstat (limited to 'drivers/gpu/drm/msm/msm_io_utils.c')
0 files changed, 0 insertions, 0 deletions