summaryrefslogtreecommitdiff
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorAbhin Parekadan Jose <abhinjoses@gmail.com>2026-08-02 17:40:59 +0000
committerMichael S. Tsirkin <mst@redhat.com>2026-09-04 17:06:03 -0400
commit1b3779dd63edfb45777efb31d99a9029cb011bf3 (patch)
treedfbfca6aa9b1b75bbf09fdb6e43059ac8f3c5155 /scripts/Makefile.thinlto
parentb138982c3bb93a7299b7287a399a8c33bdc3f5f5 (diff)
downloadlinux-next-1b3779dd63edfb45777efb31d99a9029cb011bf3.tar.gz
linux-next-1b3779dd63edfb45777efb31d99a9029cb011bf3.zip
virtio_pci_modern: avoid infinite loop in vp_reset() on invalid status
vp_reset() polls device_status in a tight loop, waiting for it to read back as 0 after the reset write. device_status is read via MMIO from the common configuration structure, which requires the PCI_COMMAND Memory Space Enable bit to be set. If that bit is cleared while the device is bound -- e.g. by writing 0x0000 to PCI_COMMAND (config space offset 4) -- the MMIO read no longer reaches the device and returns the bus's synthesized all-ones response instead. Since that value can never legitimately clear to 0, the loop spins forever and hangs the caller. Use VIRTIO_STATUS_ERROR() to recognize such values and bail out of the poll loop instead of looping indefinitely. Signed-off-by: Abhin Parekadan Jose <abhinjoses@gmail.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Message-ID: <20260802174059.4082-3-abhinjoses@gmail.com>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions