Skip to content

Commit fa5186b

Browse files
Vinod Polimeralumag
authored andcommitted
drm/msm/disp/dpu1: set vbif hw config to NULL to avoid use after memory free during pm runtime resume
BUG: Unable to handle kernel paging request at virtual address 006b6b6b6b6b6be3 Call trace: dpu_vbif_init_memtypes+0x40/0xb8 dpu_runtime_resume+0xcc/0x1c0 pm_generic_runtime_resume+0x30/0x44 __genpd_runtime_resume+0x68/0x7c genpd_runtime_resume+0x134/0x258 __rpm_callback+0x98/0x138 rpm_callback+0x30/0x88 rpm_resume+0x36c/0x49c __pm_runtime_resume+0x80/0xb0 dpu_core_irq_uninstall+0x30/0xb0 dpu_irq_uninstall+0x18/0x24 msm_drm_uninit+0xd8/0x16c Fixes: 25fdd59 ("drm/msm: Add SDM845 DPU support") Signed-off-by: Vinod Polimera <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/483255/ Link: https://lore.kernel.org/r/[email protected] [DB: fixed Fixes tag] Signed-off-by: Dmitry Baryshkov <[email protected]>
1 parent 9509359 commit fa5186b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -774,8 +774,10 @@ static void _dpu_kms_hw_destroy(struct dpu_kms *dpu_kms)
774774
for (i = 0; i < dpu_kms->catalog->vbif_count; i++) {
775775
u32 vbif_idx = dpu_kms->catalog->vbif[i].id;
776776

777-
if ((vbif_idx < VBIF_MAX) && dpu_kms->hw_vbif[vbif_idx])
777+
if ((vbif_idx < VBIF_MAX) && dpu_kms->hw_vbif[vbif_idx]) {
778778
dpu_hw_vbif_destroy(dpu_kms->hw_vbif[vbif_idx]);
779+
dpu_kms->hw_vbif[vbif_idx] = NULL;
780+
}
779781
}
780782
}
781783

0 commit comments

Comments
 (0)