From: "Christian König" <christian.koenig@amd.com>
To: Thomas Zimmermann <tzimmermann@suse.de>,
simona@ffwll.ch, airlied@gmail.com,
torvalds@linux-foundation.org, maarten.lankhorst@linux.intel.com,
mripard@kernel.org, l.stach@pengutronix.de,
linux+etnaviv@armlinux.org.uk, kraxel@redhat.com,
christian.gmeiner@gmail.com, dmitry.osipenko@collabora.com,
gurchetansingh@chromium.org, olvaffe@gmail.com,
zack.rusin@broadcom.com
Cc: bcm-kernel-feedback-list@broadcom.com,
dri-devel@lists.freedesktop.org, etnaviv@lists.freedesktop.org,
virtualization@lists.linux.dev, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v2 0/7] drm: Revert general use of struct drm_gem_object.dma_buf
Date: Tue, 15 Jul 2025 10:43:41 +0200 [thread overview]
Message-ID: <c3b85c75-839f-47c3-912a-0181ad5e108d@amd.com> (raw)
In-Reply-To: <20250715081121.34473-1-tzimmermann@suse.de>
If it helps Acked-by: Christian König <christian.koenig@amd.com> for the entire series.
Regards,
Christian.
On 15.07.25 10:07, Thomas Zimmermann wrote:
> Revert the use of drm_gem_object.dma_buf back to .import_attach->dmabuf
> in the affected places. Separates references to imported and exported DMA
> bufs within a GEM object; as before.
>
> The dma_buf field in struct drm_gem_object is not stable over the object
> instance's lifetime. The field becomes NULL when user space releases the
> final GEM handle on the buffer object. This resulted in a NULL-pointer
> deref.
>
> Workarounds in commit 5307dce878d4 ("drm/gem: Acquire references on GEM
> handles for framebuffers") and commit f6bfc9afc751 ("drm/framebuffer:
> Acquire internal references on GEM handles") only solved the problem
> partially. They especially don't work for buffer objects without a DRM
> framebuffer associated.
>
> v2:
> - extended commit messages (Sima)
> - drop the GEM-handle changes to be resolved separately
>
> Thomas Zimmermann (7):
> Revert "drm/virtio: Use dma_buf from GEM object instance"
> Revert "drm/vmwgfx: Use dma_buf from GEM object instance"
> Revert "drm/etnaviv: Use dma_buf from GEM object instance"
> Revert "drm/prime: Use dma_buf from GEM object instance"
> Revert "drm/gem-framebuffer: Use dma_buf from GEM object instance"
> Revert "drm/gem-shmem: Use dma_buf from GEM object instance"
> Revert "drm/gem-dma: Use dma_buf from GEM object instance"
>
> drivers/gpu/drm/drm_gem_dma_helper.c | 2 +-
> drivers/gpu/drm/drm_gem_framebuffer_helper.c | 8 ++++++--
> drivers/gpu/drm/drm_gem_shmem_helper.c | 4 ++--
> drivers/gpu/drm/drm_prime.c | 8 +++++++-
> drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c | 4 ++--
> drivers/gpu/drm/virtio/virtgpu_prime.c | 5 +++--
> drivers/gpu/drm/vmwgfx/vmwgfx_gem.c | 6 +++---
> 7 files changed, 24 insertions(+), 13 deletions(-)
>
prev parent reply other threads:[~2025-07-15 8:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-15 8:07 [PATCH v2 0/7] drm: Revert general use of struct drm_gem_object.dma_buf Thomas Zimmermann
2025-07-15 8:07 ` [PATCH v2 1/7] Revert "drm/virtio: Use dma_buf from GEM object instance" Thomas Zimmermann
2025-07-15 8:07 ` [PATCH v2 2/7] Revert "drm/vmwgfx: " Thomas Zimmermann
2025-07-15 8:07 ` [PATCH v2 3/7] Revert "drm/etnaviv: " Thomas Zimmermann
2025-07-15 8:07 ` [PATCH v2 4/7] Revert "drm/prime: " Thomas Zimmermann
2025-07-15 8:07 ` [PATCH v2 5/7] Revert "drm/gem-framebuffer: " Thomas Zimmermann
2025-07-15 8:07 ` [PATCH v2 6/7] Revert "drm/gem-shmem: " Thomas Zimmermann
2025-07-15 8:07 ` [PATCH v2 7/7] Revert "drm/gem-dma: " Thomas Zimmermann
2025-07-15 8:43 ` Christian König [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=c3b85c75-839f-47c3-912a-0181ad5e108d@amd.com \
--to=christian.koenig@amd.com \
--cc=airlied@gmail.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=christian.gmeiner@gmail.com \
--cc=dmitry.osipenko@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=etnaviv@lists.freedesktop.org \
--cc=gurchetansingh@chromium.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=kraxel@redhat.com \
--cc=l.stach@pengutronix.de \
--cc=linux+etnaviv@armlinux.org.uk \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=olvaffe@gmail.com \
--cc=simona@ffwll.ch \
--cc=torvalds@linux-foundation.org \
--cc=tzimmermann@suse.de \
--cc=virtualization@lists.linux.dev \
--cc=zack.rusin@broadcom.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