Re: [PATCH 2/3] drm/msm: Allocate memory for disp snapshot with kvzalloc()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 10/14/2024 9:36 AM, Douglas Anderson wrote:
With the "drm/msm: add a display mmu fault handler" series [1] we saw
issues in the field where memory allocation was failing when
allocating space for registers in msm_disp_state_dump_regs().
Specifically we were seeing an order 5 allocation fail. It's not
surprising that order 5 allocations will sometimes fail after the
system has been up and running for a while.

There's no need here for contiguous memory. Change the allocation to
kvzalloc() which should make it much less likely to fail.

[1] https://lore.kernel.org/r/20240628214848.4075651-1-quic_abhinavk@xxxxxxxxxxx/

Fixes: 98659487b845 ("drm/msm: add support to take dpu snapshot")
Signed-off-by: Douglas Anderson <dianders@xxxxxxxxxxxx>
---

  drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)


I had some doubts on how this issue happens considering that the devcore should automatically release the memory within 5 sec even if userspace had not read this. So there is no leak as such, its just that in a heavily loaded system, this can happen.

Fix looks okay to me,

Reviewed-by: Abhinav Kumar <quic_abhinavk@xxxxxxxxxxx>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux