Re: [PATCH 1/3] drm/msm: Avoid NULL dereference in msm_disp_state_print_regs()

2024-10-26 Thread Dmitry Baryshkov
On Mon, 14 Oct 2024 09:36:08 -0700, Douglas Anderson wrote: > If the allocation in msm_disp_state_dump_regs() failed then > `block->state` can be NULL. The msm_disp_state_print_regs() function > _does_ have code to try to handle it with: > > if (*reg) > dump_addr = *reg; > > [...] Applie

Re: [PATCH 1/3] drm/msm: Avoid NULL dereference in msm_disp_state_print_regs()

2024-10-14 Thread Abhinav Kumar
On 10/14/2024 9:36 AM, Douglas Anderson wrote: If the allocation in msm_disp_state_dump_regs() failed then `block->state` can be NULL. The msm_disp_state_print_regs() function _does_ have code to try to handle it with: if (*reg) dump_addr = *reg; ...but since "dump_addr" is initializ

[PATCH 1/3] drm/msm: Avoid NULL dereference in msm_disp_state_print_regs()

2024-10-14 Thread Douglas Anderson
If the allocation in msm_disp_state_dump_regs() failed then `block->state` can be NULL. The msm_disp_state_print_regs() function _does_ have code to try to handle it with: if (*reg) dump_addr = *reg; ...but since "dump_addr" is initialized to NULL the above is actually a noop. The code then