This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 524022 - qemu's pci_add monitor command should not exit() if the NIC model is not valid
qemu's pci_add monitor command should not exit() if the NIC model is not valid
Product: Fedora
Classification: Fedora
Component: qemu (Show other bugs)
All Linux
high Severity high
: ---
: ---
Assigned To: Glauber Costa
Fedora Extras Quality Assurance
Depends On:
Blocks: F12VirtTarget
  Show dependency treegraph
Reported: 2009-09-17 12:05 EDT by Vladimir Benes
Modified: 2009-09-28 12:46 EDT (History)
11 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-09-28 12:46:21 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:

Attachments (Terms of Use)
virt-manager.log (6.41 KB, text/plain)
2009-09-17 12:07 EDT, Vladimir Benes
no flags Details

  None (edit)
Description Vladimir Benes 2009-09-17 12:05:34 EDT
Description of problem:
when I attach network device then detach it and then attach it again virtual guest goes down with this message in /var/log/libvirt/qemu/$guest.log:
char device redirected to /dev/pts/0
qemu: Unsupported NIC model: �c��
qemu: Supported NIC models: 

Version-Release number of selected component (if applicable):



How reproducible:

Steps to Reproduce:
1.install virt guest and delete all NIC devices
2.power on guest
3.attach new NIC (NAT type)
4.detach that NIC again
5.attach that NIC again
Actual results:
guest is stopped with this question:

Are you sure you want to add this device?

This device could not be attached to the running machine. Would you like to make the device available after the next VM shutdown?

Warning: this will overwrite any other changes that require a VM reboot.

Expected results:
guest still running and NIC attached again

Additional info:
Comment 1 Vladimir Benes 2009-09-17 12:07:33 EDT
Created attachment 361520 [details]
Comment 2 Mark McLoughlin 2009-09-17 12:36:27 EDT
This looks like two issues with qemu:

  1) When not passed a model and you do pci_add/pci_del/pci_add with no
     model= parameter, it seems to get the parameters confused

  2) It exits when you pass an invalid model= via pci_add rather than
     just printing an error
Comment 3 Glauber Costa 2009-09-17 16:30:04 EDT
This is a trivial use-after-free bug.

I've just sent a patch upstream
Comment 4 Mark McLoughlin 2009-09-18 08:13:09 EDT
Patch is here:

Still need to fix (2), though
Comment 5 Mark McLoughlin 2009-09-23 07:33:40 EDT
Patch applied in rawhide now, thanks

* Wed Sep 23 2009 Mark McLoughlin <> - 2:0.10.92-5
- Fix issue causing NIC hotplug confusion when no model is specified (#524022)

Leaving it open to fix the other issue
Comment 6 Mark McLoughlin 2009-09-28 12:46:21 EDT
Should be fixed in rawhide now thanks to a cherry-pick from Markus's series here:

* Mon Sep 28 2009 Mark McLoughlin <> - 2:0.11.0-2
- Fix pci hotplug to not exit if supplied an invalid NIC model (#524022)

Note You need to log in before you can comment on or make changes to this bug.