From: Dmitry Osipenko <dmitry.osipenko@collabora.com>
To: dongwon.kim@intel.com, dri-devel@lists.freedesktop.org,
airlied@redhat.com, kraxel@redhat.com
Cc: nirmoyd@nvidia.com, vivek.kasireddy@intel.com
Subject: Re: [PATCH v7 2/3] drm/virtio: Add support for saving and restoring virtio_gpu_objects
Date: Wed, 25 Feb 2026 19:07:49 +0300 [thread overview]
Message-ID: <482bac4b-9fd8-46ca-b44e-664b9b1870bd@collabora.com> (raw)
In-Reply-To: <20260107182745.229481-3-dongwon.kim@intel.com>
On 1/7/26 21:27, dongwon.kim@intel.com wrote:
> diff --git a/drivers/gpu/drm/virtio/virtgpu_object.c b/drivers/gpu/drm/virtio/virtgpu_object.c
> index e6363c887500..8e8a8ec4a361 100644
> --- a/drivers/gpu/drm/virtio/virtgpu_object.c
> +++ b/drivers/gpu/drm/virtio/virtgpu_object.c
> @@ -65,6 +65,12 @@ void virtio_gpu_cleanup_object(struct virtio_gpu_object *bo)
> {
> struct virtio_gpu_device *vgdev = bo->base.base.dev->dev_private;
>
> + if (!list_empty(&bo->restore_node)) {
> + mutex_lock(&vgdev->obj_restore_lock);
> + list_del(&bo->restore_node);
> + mutex_unlock(&vgdev->obj_restore_lock);
> + }
This looks fragile to me, I'd use list_del_init() unconditionally.
Also, looks wrong to delete object's node from the list by the
virtio_gpu_cleanup_object() that is invoked from cmd-completion
callback. You calling virtio_gpu_object_unref_all() that walks up
obj_restore_list while obj already may be in process of async unref'ing?
--
Best regards,
Dmitry
next prev parent reply other threads:[~2026-02-25 16:07 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-07 18:27 [PATCH v7 0/3] Virtio-GPU S4 support dongwon.kim
2026-01-07 18:27 ` [PATCH v7 1/3] drm/virtio: Freeze and restore hooks to support suspend and resume dongwon.kim
2026-02-25 16:06 ` Dmitry Osipenko
2026-01-07 18:27 ` [PATCH v7 2/3] drm/virtio: Add support for saving and restoring virtio_gpu_objects dongwon.kim
2026-01-09 16:40 ` kernel test robot
2026-01-12 4:03 ` kernel test robot
2026-01-12 8:16 ` kernel test robot
2026-02-25 16:07 ` Dmitry Osipenko [this message]
2026-01-07 18:27 ` [PATCH v7 3/3] drm/virtio: Add PM notifier to restore objects after hibernation dongwon.kim
2026-02-25 16:06 ` Dmitry Osipenko
2026-02-25 16:06 ` Dmitry Osipenko
2026-02-25 16:05 ` [PATCH v7 0/3] Virtio-GPU S4 support Dmitry Osipenko
2026-02-25 17:06 ` Kim, Dongwon
2026-04-30 22:39 ` 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=482bac4b-9fd8-46ca-b44e-664b9b1870bd@collabora.com \
--to=dmitry.osipenko@collabora.com \
--cc=airlied@redhat.com \
--cc=dongwon.kim@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kraxel@redhat.com \
--cc=nirmoyd@nvidia.com \
--cc=vivek.kasireddy@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