Skip to content

qdev: fail safely if can't allocate device in device_add()

Igor Mammedov qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2qom: add object_class_get_instance_size()include/qom/object.h qom/object.c+13 -01 reply
2/2qdev: safely fail device_add if unable to allocate deviceqdev-monitor.c+8 -15 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Qemu-devel] [PATCH 0/2] qdev: fail safely if can't allocate device in device_add()

For hotplug it's important not to crash guest if hotplug is not possible. This series make 'device_add FOO,...' fail safely if there isn't enough memory for FOO device instance.

Igor Mammedov (2):
qom: add object_class_get_instance_size()
qdev: safely fail device_add if unable to allocate device

 include/qom/object.h | 8 ++++++++
 qdev-monitor.c       | 9 ++++++++-
 qom/object.c         | 5 +++++
 3 files changed, 21 insertions(+), 1 deletion(-)
Signature · 1 line
1.8.3.1