From: sashiko-bot@kernel.org
To: "Nguyen Ngoc Thang" <ngocthang2710.1999@gmail.com>
Cc: "Eugenio Perez" <eperezma@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
dri-devel@lists.freedesktop.org, virtualization@lists.linux.dev
Subject: Re: [PATCH] drm/virtio: share one vbuf cache across all devices
Date: Sat, 26 Sep 2026 16:33:10 +0000 [thread overview]
Message-ID: <20260926163310.DDFAB1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260926162452.136863-1-ngocthang2710.1999@gmail.com>
> virtio_gpu_alloc_vbufs() creates a kmem_cache with the fixed name
> "virtio-gpu-vbufs" for every device and destroys it from
> virtio_gpu_release(), which only runs once the last drm_device
> reference is dropped. If a reference outlives the PCI removal (for
> instance an open /dev/fbN), a rescan probes the device again while the
> old cache still exists:
>
> kmem_cache of name 'virtio-gpu-vbufs' already exists
> WARNING: mm/slab_common.c:111 at __kmem_cache_create_args
> Call Trace:
> virtio_gpu_alloc_vbufs
> virtio_gpu_init
> virtio_gpu_probe
> ...
> pci_rescan_bus
> rescan_store
>
> kmem_cache_create() then fails and the new device does not probe.
>
> The vbuf size is the same for every device, so create the cache once
> at module init and destroy it at module exit instead of per device.
>
> Reported-by: syzbot+1b129b44597a126d2d79@syzkaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=1b129b44597a126d2d79
> Fixes: dc5698e80cf7 ("Add virtio gpu driver.")
> Signed-off-by: Nguyen Ngoc Thang <ngocthang2710.1999@gmail.com>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260926162452.136863-1-ngocthang2710.1999@gmail.com?part=1
next prev parent reply other threads:[~2026-09-26 16:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-26 16:24 [PATCH] drm/virtio: share one vbuf cache across all devices Nguyen Ngoc Thang
2026-09-26 16:33 ` sashiko-bot [this message]
2026-09-27 0:03 ` Hillf Danton
2026-09-27 4:09 ` Nguyen Ngoc Thang
2026-10-09 17: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=20260926163310.DDFAB1F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=eperezma@redhat.com \
--cc=mst@redhat.com \
--cc=ngocthang2710.1999@gmail.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