From: Abhinav Kumar <quic_abhinavk@quicinc.com>
To: Douglas Anderson <dianders@chromium.org>,
Rob Clark <robdclark@gmail.com>,
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: Stephen Boyd <swboyd@chromium.org>,
David Airlie <airlied@gmail.com>,
Marijn Suijten <marijn.suijten@somainline.org>,
Sean Paul <sean@poorly.run>, Simona Vetter <simona@ffwll.ch>,
<dri-devel@lists.freedesktop.org>,
<freedreno@lists.freedesktop.org>,
<linux-arm-msm@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/3] drm/msm: Allocate memory for disp snapshot with kvzalloc()
Date: Mon, 14 Oct 2024 11:56:20 -0700 [thread overview]
Message-ID: <00e4015e-9dcb-4a05-90a4-0bca62c3b0a2@quicinc.com> (raw)
In-Reply-To: <20241014093605.2.I72441365ffe91f3dceb17db0a8ec976af8139590@changeid>
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@quicinc.com/
>
> Fixes: 98659487b845 ("drm/msm: add support to take dpu snapshot")
> Signed-off-by: Douglas Anderson <dianders@chromium.org>
> ---
>
> 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@quicinc.com>
next prev parent reply other threads:[~2024-10-14 18:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-14 16:36 [PATCH 1/3] drm/msm: Avoid NULL dereference in msm_disp_state_print_regs() Douglas Anderson
2024-10-14 16:36 ` [PATCH 2/3] drm/msm: Allocate memory for disp snapshot with kvzalloc() Douglas Anderson
2024-10-14 18:56 ` Abhinav Kumar [this message]
2024-10-14 16:36 ` [PATCH 3/3] drm/msm: Simplify NULL checking in msm_disp_state_dump_regs() Douglas Anderson
2024-10-14 19:03 ` Abhinav Kumar
2024-10-14 18:52 ` [PATCH 1/3] drm/msm: Avoid NULL dereference in msm_disp_state_print_regs() Abhinav Kumar
2024-10-27 2:04 ` Dmitry Baryshkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=00e4015e-9dcb-4a05-90a4-0bca62c3b0a2@quicinc.com \
--to=quic_abhinavk@quicinc.com \
--cc=airlied@gmail.com \
--cc=dianders@chromium.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marijn.suijten@somainline.org \
--cc=robdclark@gmail.com \
--cc=sean@poorly.run \
--cc=simona@ffwll.ch \
--cc=swboyd@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®