From: Mikel Rychliski <mikel@mikelr.com>
To: "Christian König" <christian.koenig@amd.com>
Cc: "Alex Deucher" <alexander.deucher@amd.com>,
"Pan, Xinhui" <Xinhui.Pan@amd.com>,
"David Airlie" <airlied@linux.ie>,
"Daniel Vetter" <daniel@ffwll.ch>,
"Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] drm/radeon: Fix NULL dereference when updating memory stats
Date: Thu, 24 Jun 2021 00:52:01 -0400 [thread overview]
Message-ID: <12410445.c4f2iDpdjA@glidewell> (raw)
In-Reply-To: <085b7f51-15b8-42e0-fcf0-66da839542c8@amd.com>
On Wednesday, June 23, 2021 2:55:04 AM EDT Christian König wrote:
> Please rather keep the new resource as parameter here and update before
> adjusting bo->resource.
>
> This way you also don't need to export radeon_update_memory_usage().
I wasn't sure exactly what you intended with the request to "update before
adjusting bo->resource".
Assuming the statistics update is done as part of radeon_bo_move_notify(), I
believe that function cannot be called any earlier in radeon_bo_move(). If it
were, the source object would be invalidated before it moved.
So I assume you're suggesting updating the memory usage earlier in
bo_move_notify (before the early return for ghost objects).
Thanks,
Mikel
prev parent reply other threads:[~2021-06-24 4:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-22 21:26 [PATCH v2] drm/radeon: Fix NULL dereference when updating memory stats Mikel Rychliski
2021-06-23 6:55 ` Christian König
2021-06-24 4:51 ` [PATCH v3] " Mikel Rychliski
2021-06-30 9:55 ` Christian König
2021-06-24 4:52 ` Mikel Rychliski [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=12410445.c4f2iDpdjA@glidewell \
--to=mikel@mikelr.com \
--cc=Xinhui.Pan@amd.com \
--cc=airlied@linux.ie \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=thomas.hellstrom@linux.intel.com \
/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