Skip to content

pci: handle zero size ROM files gracefully

Stefan Hajnoczi qemu-devel 1 version Applied

Status from this message: Applied, thanks.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 1 replyApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2pci: refuse empty ROM fileshw/pci/pci.c+6 -10 replies
2/2exec: assert that RAMBlock size is non-zeroexec.c+2 -00 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] pci: handle zero size ROM files gracefully

This is a fix for https://bugs.launchpad.net/qemu/+bug/1127053.

If pxe-e1000.rom has 0 size we allocate the same RAMBlock offset twice and fail with an assertion in qemu_ram_set_idstr() later on.

Two fixes:

1. Print an error when the ROM file has zero size. Use -device ...,romfile= instead to disable the ROM.

2. Add an assertion to find_ram_offset() so we watch this inconsistency if it ever happens again.

Stefan Hajnoczi (2):
pci: refuse empty ROM files
exec: assert that RAMBlock size is non-zero

 exec.c       | 2 ++
 hw/pci/pci.c | 7 ++++++-
 2 files changed, 8 insertions(+), 1 deletion(-)
Signature · 1 line
1.8.1.4