Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] virtio: missing indentation for if-statement body in vp_setup_vq() --
commit 109e547b3fda2539201c9831108e08b3f9d3dbe9 Author: Zenghui Yu <[email protected]> WARNING: possible circular locking dependency detected This commit addresses a circular locking dependency involving cpu_hotplug_lock, the MSI mutex, and the IOMMU group mutex in virtio_pci. It caches the Linux IRQ number in virtio_pci_vq_info to avoid calling pci_irq_vector() and taking the MSI mutex under the cpu_hotplug_lock. > diff --git a/drivers/virtio/virtio_pci_common.c > b/drivers/virtio/virtio_pci_common.c > index b90c174450b20..df2774fb6d845 100644 > --- a/drivers/virtio/virtio_pci_common.c > +++ b/drivers/virtio/virtio_pci_common.c [ ... ] > @@ -224,6 +224,16 @@ static struct virtqueue *vp_setup_vq(struct > virtio_device *vdev, unsigned int in > goto out_info; > > info->vq = vq; > + > + /* > + * Cache the Linux IRQ number so that later users (e.g. > + * vp_set_vq_affinity() from cpu hotplug locked contexts) > + * don't have to take the MSI mutex via pci_irq_vector(). > + */ > + info->virq = 0; > + if (msix_vec != VIRTIO_MSI_NO_VECTOR) > + info->virq = pci_irq_vector(vp_dev->pci_dev, msix_vec); [Severity: Low] This isn't a bug, but is the body of this if-statement in vp_setup_vq() missing a tab of indentation? > + > if (callback) { > spin_lock_irqsave(&vp_dev->lock, flags); > if (!vp_is_slow_path_vector(msix_vec)) -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=1
