Bug 1269180 - Device creation should not exit(1) on OOM
Device creation should not exit(1) on OOM
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev (Show other bugs)
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Markus Armbruster
Depends On:
  Show dependency treegraph
Reported: 2015-10-06 10:21 EDT by Markus Armbruster
Modified: 2018-03-30 17:39 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Markus Armbruster 2015-10-06 10:21:35 EDT
Description of problem:
A number of device models call exit(1) on out-of-memory errors in their realize methods.  They should propagate the error instead.  Known offenders: "stm32f205-soc", "xlnx,zynqmp", "cgthree", "qxl-vga", "qxl", "SUNW,tcx", "isa-cirrus-vga", "cirrus-vga", "isa-vga", "VGA", "secondary-vga", "virtio-vga", "vmware-svga".

Some device models do it in their instance_init() methods.  The code that can fail that wat should be moved to the realize method instead, where the error can be propagated properly.  Known offenders: "cgthree", "SUNW,tcx".

Several of these devices are irrelevant for RHEL-7, but not all.

How reproducible:
Found by code inspection.  Actually reproducing the incorrect exit(1) would involve rigging the out-of-memory condition somehow.

Additional info:
See http://lists.gnu.org/archive/html/qemu-devel/2015-09/msg03493.html

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