From: sashiko-bot@kernel.org
To: "Junrui Luo" <moonafterrain@outlook.com>
Cc: dri-devel@lists.freedesktop.org,
"Michael S. Tsirkin" <mst@redhat.com>,
"Eugenio Perez" <eperezma@redhat.com>,
virtualization@lists.linux.dev
Subject: Re: [PATCH v2 4/4] drm/virtio: release the GEM object on virtio_gpu_vram_create() errors
Date: Tue, 15 Sep 2026 07:50:22 +0000 [thread overview]
Message-ID: <20260915075022.C1ECD1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260915-fixes-v2-4-a0d799e4db66@outlook.com>
> From: Junrui Luo <moonafterrain@outlook.com>
>
> virtio_gpu_vram_create() frees the object with a bare kfree(vram) on
> both error paths after drm_gem_private_object_init() has run, and on the
> second one after drm_gem_create_mmap_offset() has linked obj->vma_node
> into the device's VMA offset manager. The freed object stays in that
> interval tree, so a later lookup or insertion walks freed memory, and
> the dma_resv and gpuva lock are never destroyed.
>
> Call drm_gem_object_release() before kfree() on both paths.
>
> Fixes: 16845c5d5409 ("drm/virtio: implement blob resources: implement vram object")
> Assisted-by: Claude:claude-opus-5
> Signed-off-by: Junrui Luo <moonafterrain@outlook.com>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260915-fixes-v2-0-a0d799e4db66@outlook.com?part=4
next prev parent reply other threads:[~2026-09-15 7:50 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2026-09-20 18:18 ` [PATCH v2 0/4] drm/virtio: fix GEM object leaks on error paths Dmitry Osipenko
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=20260915075022.C1ECD1F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=eperezma@redhat.com \
--cc=moonafterrain@outlook.com \
--cc=mst@redhat.com \
--cc=sashiko-reviews@lists.linux.dev \
--cc=virtualization@lists.linux.dev \
/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 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.