> From: Linfeng Sun <[email protected]> > > vhost_scsi_set_endpoint() allocates command pools only for I/O > virtqueues that are already set up, but publishes the backend for every > virtqueue. Userspace can complete a skipped queue after attaching the > endpoint, then kick it with scsi_tags uninitialized and trigger the > alloc_hint warning in sbitmap_get(). > > Delayed virtqueue setup is not supported. Leave skipped I/O virtqueues > inactive and reject changes to the vring size or addresses while an > endpoint is attached. Userspace must clear the endpoint before changing > the vring configuration. > > I found this bug myself, though the patch was written with AI assistance. > > Fixes: 25b98b64e284 ("vhost scsi: alloc cmds per vq instead of session") > Assisted-by: OpenAI-Codex:GPT-5.6 > Signed-off-by: Linfeng Sun <[email protected]>
Sashiko has reviewed this patch and found no issues. It looks great! -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=1
