aboutsummaryrefslogtreecommitdiff
path: root/page_cache.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2015-03-11 18:39:16 +0100
committerMarkus Armbruster <armbru@redhat.com>2015-06-22 18:20:39 +0200
commited238ba2a0239368dd0cec9bfaf3300a5bd303ce (patch)
tree8838766f79ba176587d4b2730a766c45caec1701 /page_cache.c
parenta5ec494e274ddcad6d487e3872e16964ef57e0de (diff)
qdev-monitor: Fix check for full bus
Property bus has always been too screwed up to be really usable for values other than plain bus IDs. This just fixes a bug that crept in in commit 1395af6 "qdev: add a maximum device allowed field for the bus." It doesn't always fail when it should: $ qemu-system-x86_64 -nodefaults -device virtio-serial-pci -device virtio-rng-device,bus=pci.0/virtio-serial-pci/virtio-bus Happily plugs the virtio-rng-device into the virtio-bus provided by virtio-serial-pci, even though its only slot is already occupied by a virtio-serial-device. And sometimes fails when it shouldn't: $ qemu-system-x86_64 -nodefaults -device virtio-serial-pci -device virtserialport,bus=virtio-bus/virtio-serial-device Yes, the virtio-bus is full, but the virtio-serial-bus provided by virtio-serial-device isn't, and that's the one we're trying to use. Root cause: we check "bus full" when we resolve the first element of the path. That's the correct one only when it's also the last one. Fix by moving the "bus full" check to right before we return a bus. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'page_cache.c')
0 files changed, 0 insertions, 0 deletions