From: Dan Carpenter <dan.carpenter@oracle.com>
To: Rob Clark <robdclark@chromium.org>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [bug report] drm/msm: devcoredump iommu fault support
Date: Thu, 12 May 2022 14:00:52 +0300 [thread overview]
Message-ID: <20220512110052.GE29930@kadam> (raw)
In-Reply-To: <CAJs_Fx44WNivGtF1E36Lti5H0J+7VvS-+aKJ25-pTTa4H_-T_g@mail.gmail.com>
On Mon, May 09, 2022 at 07:48:23AM -0700, Rob Clark wrote:
> On Sun, May 8, 2022 at 11:28 PM Dan Carpenter <dan.carpenter@oracle.com> wrote:
> > 407 } else {
> > 408 /*
> > 409 * We couldn't attribute this fault to any particular context,
> > 410 * so increment the global fault count instead.
> > 411 */
> > 412 gpu->global_faults++;
> > 413 }
> > 414
> > 415 /* Record the crash state */
> > 416 pm_runtime_get_sync(&gpu->pdev->dev);
> > 417 msm_gpu_crashstate_capture(gpu, submit, comm, cmd);
> > ^^^^^^^^^^^^^^^^^^^^^^^^^^^
> > This function calls:
> >
> > dev_coredumpm(gpu->dev->dev, THIS_MODULE, gpu, 0, GFP_KERNEL,
> > ^^^
> > Which kfrees gpu.
>
> How does the gpu object get kfree'd? That is the root problem, it
> shouldn't be freed until module unload. I don't think e25e92e08e32:
> "drm/msm: devcoredump iommu fault support" is actually related.
>
> Is there a way to reproduce this?
Ah. Thanks for your feedback. I saw free(data) and misread it as
kfree(data). It's actually a function pointer which is
msm_gpu_devcoredump_free() so it doesn't free "gpu".
My bad.
regards,
dan carpenter
prev parent reply other threads:[~2022-05-12 11:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-09 6:28 [bug report] drm/msm: devcoredump iommu fault support Dan Carpenter
2022-05-09 14:48 ` Rob Clark
2022-05-12 11:00 ` Dan Carpenter [this message]
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=20220512110052.GE29930@kadam \
--to=dan.carpenter@oracle.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=robdclark@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