diff options
| author | Greg Kurz | 2017-10-04 11:02:31 +0200 |
|---|---|---|
| committer | David Gibson | 2017-10-17 01:34:00 +0200 |
| commit | 827b17c468b0dae69f82f852958d16f4bf6d6bf0 (patch) | |
| tree | 8ec767ad79cd15c27962b8523b3aeafaa5ec5f46 /scripts | |
| parent | spapr: fix OF word name in comment (diff) | |
| download | qemu-827b17c468b0dae69f82f852958d16f4bf6d6bf0.tar.gz qemu-827b17c468b0dae69f82f852958d16f4bf6d6bf0.tar.xz qemu-827b17c468b0dae69f82f852958d16f4bf6d6bf0.zip | |
spapr: sanity check size of the CAS buffer
The CAS buffer is provided by SLOF. A broken SLOF could pass a silly
size: either smaller than the diff header, in which case the current
code will try to allocate 16 Exabytes of memory and g_malloc0() will
abort, or bigger than the maximum memory provisioned for SLOF (ie,
40 Megabytes), which doesn't make sense. Both cases indicate that
SLOF has a bug.
Let's print out an explicit error message and exit since rebooting as
we do with other errors would only result in a reset loop.
Signed-off-by: Greg Kurz <groug@kaod.org>
[dwg: Fix format specifier that broke 32-bit builds]
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions
