All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] drm/virtio: fix GEM object leaks on error paths
@ 2026-09-15  7:39 ` Junrui Luo via B4 Relay
  0 siblings, 0 replies; 15+ messages in thread
From: Junrui Luo @ 2026-09-15  7:39 UTC (permalink / raw)
  To: David Airlie, Gerd Hoffmann, Dmitry Osipenko, Gurchetan Singh,
	Chia-I Wu, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	Simona Vetter, Michael S. Tsirkin, Dave Airlie
  Cc: dri-devel, virtualization, linux-kernel, Junrui Luo, Yuhao Jiang

v1 fixed one drm_gem_object_release() misuse in virtio_gpu_gem_create().
Dmitry asked for the other occurrences the Sashiko bot pointed at [1], so
v2 turns it into a series.

Patches 1-3 replace drm_gem_object_release() with drm_gem_object_put() on
the GEM creation error paths. Patch 1 is unchanged from v1.

Patch 4 adds the missing drm_gem_object_release() before kfree(vram) in
virtio_gpu_vram_create().

Only compile-tested (x86_64, CONFIG_DRM_VIRTIO_GPU=m).

[1] https://lore.kernel.org/all/55240372-c265-4b38-be94-f29a58ddbb22@collabora.com/

Changes in v2:
- Add patches 2-4 covering the other occurrences reported by the bot
  (Dmitry Osipenko)
- Link to v1: https://lore.kernel.org/r/20260815-virtgpu-gem-create-leak-v1-1-a4e9fb18caa3@outlook.com

Signed-off-by: Junrui Luo <moonafterrain@outlook.com>
---
Junrui Luo (4):
      drm/virtio: fix object leak when drm_gem_handle_create() fails
      drm/virtio: fix object leak in virtio_gpu_resource_create_ioctl()
      drm/virtio: fix object leaks in virtio_gpu_resource_create_blob_ioctl()
      drm/virtio: release the GEM object on virtio_gpu_vram_create() errors

 drivers/gpu/drm/virtio/virtgpu_gem.c   |  2 +-
 drivers/gpu/drm/virtio/virtgpu_ioctl.c |  6 +++---
 drivers/gpu/drm/virtio/virtgpu_vram.c  | 17 +++++++++--------
 3 files changed, 13 insertions(+), 12 deletions(-)
---
base-commit: 587858367581b9c55c3690f4e63382ad622719d4
change-id: 20260915-fixes-8c6917e90665

Best regards,
-- 
Junrui Luo <moonafterrain@outlook.com>


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2026-09-20 18:34 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-15  7:39 [PATCH v2 0/4] drm/virtio: fix GEM object leaks on error paths Junrui Luo
2026-09-15  7:39 ` Junrui Luo via B4 Relay
2026-09-15  7:39 ` [PATCH v2 1/4] drm/virtio: fix object leak when drm_gem_handle_create() fails Junrui Luo
2026-09-15  7:39   ` Junrui Luo via B4 Relay
2026-09-15  7:46   ` sashiko-bot
2026-09-15  7:39 ` [PATCH v2 2/4] drm/virtio: fix object leak in virtio_gpu_resource_create_ioctl() Junrui Luo
2026-09-15  7:39   ` Junrui Luo via B4 Relay
2026-09-15  7:48   ` sashiko-bot
2026-09-15  7:39 ` [PATCH v2 3/4] drm/virtio: fix object leaks in virtio_gpu_resource_create_blob_ioctl() Junrui Luo
2026-09-15  7:39   ` Junrui Luo via B4 Relay
2026-09-15  7:48   ` sashiko-bot
2026-09-15  7:39 ` [PATCH v2 4/4] drm/virtio: release the GEM object on virtio_gpu_vram_create() errors Junrui Luo
2026-09-15  7:39   ` Junrui Luo via B4 Relay
2026-09-15  7:50   ` sashiko-bot
2026-09-20 18:18 ` [PATCH v2 0/4] drm/virtio: fix GEM object leaks on error paths Dmitry Osipenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.