From: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>,
<intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH v4 0/4] Have xe_vm and xe_exec_queue take references to xef
Date: Fri, 19 Jul 2024 11:40:39 -0700 [thread overview]
Message-ID: <ZpqzJ+PwGi89quSe@orsosgc001> (raw)
In-Reply-To: <65ibpaeheqwit3co3h2rywtnbh4a6gu2bdth4bbyecuwiqdlms@7bx63x4bis24>
On Fri, Jul 19, 2024 at 02:47:29AM -0500, Lucas De Marchi wrote:
>On Fri, Jul 19, 2024 at 07:16:19AM GMT, Matthew Brost wrote:
>>On Thu, Jul 18, 2024 at 02:05:44PM -0700, Umesh Nerlige Ramappa wrote:
>>>Just posting the revision that will be pushed for reference. This rev
>>>only has documentation changes compared to v2, so will not run CI on
>>>this.
>>>-----
>
>great. indeed no need to wait for CI.
>
>>>xe_file_close triggers an asynchronous queue cleanup and then frees up
>>>the xef object. Since queue cleanup flushes all pending jobs and the KMD
>>>stores client usage stats into the xef object after jobs are flushed, we
>>>see a use-after-free for the xef object. Resolve this by taking a
>>>reference to xef from xe_exec_queue.
>>>
>>>Issue: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1908
>>
>>It looks like not having ref to vm->xref is causing other issues too [1]
>>[2].
>>
>>Let's get this in ASAP.
>
>IN it is. There was only a minor conflict with drm-misc-next, but that
>was trivial to solve.
You beat me to it, I was having some dim ub trouble this morning. It
keeps getting disconnected.
Thanks for pushing this.
Regards,
Umesh
>
>Thanks for this fix,
>
>Lucas De Marchi
>
>>
>>Matt
>>
>>[1] https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/2273
>>[2] https://patchwork.freedesktop.org/patch/605099/?series=136240&rev=1
>>
>>>
>>>The series adds xef refcounting and ensures all consumers of xef take a
>>>ref to it.
>>>
>>>v2:
>>>- Include review comments from v1
>>>- Squash patch 3 and 5 from v1 to add Fixes/Closes tags
>>>
>>>v3:
>>>- kernel-doc fixes (Lucas, Matt)
>>>
>>>v4: Rebase to drm-tip
>>>
>>>Note: Patches 1 - 3 can be merged independently
>>>
>>>Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
>>>
>>>Umesh Nerlige Ramappa (4):
>>> drm/xe: Move part of xe_file cleanup to a helper
>>> drm/xe: Add ref counting for xe_file
>>> drm/xe: Take a ref to xe file when user creates a VM
>>> drm/xe: Fix use after free when client stats are captured
>>>
>>> drivers/gpu/drm/xe/xe_device.c | 58 +++++++++++++++++++-----
>>> drivers/gpu/drm/xe/xe_device.h | 3 ++
>>> drivers/gpu/drm/xe/xe_device_types.h | 3 ++
>>> drivers/gpu/drm/xe/xe_drm_client.c | 5 +-
>>> drivers/gpu/drm/xe/xe_exec_queue.c | 10 +++-
>>> drivers/gpu/drm/xe/xe_exec_queue_types.h | 7 ++-
>>> drivers/gpu/drm/xe/xe_vm.c | 6 ++-
>>> 7 files changed, 71 insertions(+), 21 deletions(-)
>>>
>>>--
>>>2.38.1
>>>
next prev parent reply other threads:[~2024-07-19 18:40 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-18 21:05 [PATCH v4 0/4] Have xe_vm and xe_exec_queue take references to xef Umesh Nerlige Ramappa
2024-07-18 21:05 ` [PATCH v4 1/4] drm/xe: Move part of xe_file cleanup to a helper Umesh Nerlige Ramappa
2024-07-18 21:05 ` [PATCH v4 2/4] drm/xe: Add ref counting for xe_file Umesh Nerlige Ramappa
2024-07-18 21:05 ` [PATCH v4 3/4] drm/xe: Take a ref to xe file when user creates a VM Umesh Nerlige Ramappa
2024-07-18 21:05 ` [PATCH v4 4/4] drm/xe: Fix use after free when client stats are captured Umesh Nerlige Ramappa
2024-07-22 19:00 ` Rodrigo Vivi
2024-07-23 22:11 ` Umesh Nerlige Ramappa
2024-08-08 20:06 ` Lucas De Marchi
2024-07-18 23:21 ` ✓ CI.Patch_applied: success for Have xe_vm and xe_exec_queue take references to xef (rev4) Patchwork
2024-07-18 23:22 ` ✓ CI.checkpatch: " Patchwork
2024-07-18 23:23 ` ✓ CI.KUnit: " Patchwork
2024-07-18 23:35 ` ✓ CI.Build: " Patchwork
2024-07-18 23:37 ` ✓ CI.Hooks: " Patchwork
2024-07-18 23:38 ` ✓ CI.checksparse: " Patchwork
2024-07-19 0:00 ` ✗ CI.BAT: failure " Patchwork
2024-07-19 7:16 ` [PATCH v4 0/4] Have xe_vm and xe_exec_queue take references to xef Matthew Brost
2024-07-19 7:47 ` Lucas De Marchi
2024-07-19 18:40 ` Umesh Nerlige Ramappa [this message]
2024-07-19 9:44 ` ✓ CI.FULL: success for Have xe_vm and xe_exec_queue take references to xef (rev4) Patchwork
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=ZpqzJ+PwGi89quSe@orsosgc001 \
--to=umesh.nerlige.ramappa@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=lucas.demarchi@intel.com \
--cc=matthew.brost@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