Linux virtualization list
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Yu, Fei" <fei.yu@intel.com>, virtualization@lists.linux.dev
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
	"Eugenio Perez" <eperezma@redhat.com>
Subject: Re: [PATCH v2] drm/virtio: Put GEM objects when dropping a vbuf without queueing it
Date: Tue, 03 Nov 2026 09:01:46 +0000	[thread overview]
Message-ID: <sashiko-outbox-194912@kernel.org> (raw)
In-Reply-To: <20261103085314.3102802-1-fei.yu@intel.com>

> From: Nguyen Ngoc Thang <ngocthang2710.1999@gmail.com>
> 
> virtio_gpu_queue_ctrl_sgs() drops the command when drm_dev_enter()
> fails or when vqs_released is set during device removal. It unlocks the
> reservations and frees the vbuf, but never releases the GEM object
> references that the caller transferred in vbuf->objs. Those references
> are normally dropped by the dequeue worker once the host completes the
> command, which never happens for a command that was not queued.
> 
> If a framebuffer flush or transfer (e.g. the fbdev damage worker) races
> with device removal, the GEM object backing the buffer keeps a stale
> reference and is never freed. GEM objects do not hold a reference on the
> drm_device, so the device is still released, with the object's node left
> in the vma offset manager:
> 
> [ ... ]
> Link: https://lore.kernel.org/all/20260927040655.14531-1-ngocthang2710.1999@gmail.com/
> Signed-off-by: Nguyen Ngoc Thang <ngocthang2710.1999@gmail.com>
> [fei.yu: also handle the vmalloc_to_sgt() failure path, pass the fence
>  to the helper instead of a bool, fix the Fixes tags]
> Signed-off-by: Fei Yu <fei.yu@intel.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261103085314.3102802-1-fei.yu@intel.com?part=1


      reply	other threads:[~2026-11-03  9:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-27  4:06 [PATCH] drm/virtio: put GEM objects when dropping a vbuf on unplug Nguyen Ngoc Thang
2026-09-27  4:19 ` sashiko-bot
2026-11-03  8:53 ` [PATCH v2] drm/virtio: Put GEM objects when dropping a vbuf without queueing it Yu, Fei
2026-11-03  9:01   ` sashiko-bot [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=sashiko-outbox-194912@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=eperezma@redhat.com \
    --cc=fei.yu@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox