qemu-e2k/hw/acpi
Haozhong Zhang c8e6c93857 nvdimm: fix header pointer in nvdimm_build_nfit()
In the current nvdimm_build_nfit(), the pointer 'header' initially equals
to table_data->data + table_data->len. However, the following
g_array_append_vals(table_data, structures->data, structures->len)
may resize and relocate table_data->data[]. Therefore, the usage of 'header'
afterwards may be illegal.

This patch fixes this issue by storing an offset within table_data->data[]
(rather than an address) in 'header'.

Signed-off-by: Haozhong Zhang <haozhong.zhang@intel.com>
Reviewed-by: Xiao Guangrong <guangrong.xiao@linux.intel.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2016-01-08 16:01:37 +02:00
..
acpi_interface.c acpi: introduce TYPE_ACPI_DEVICE_IF interface 2014-06-19 18:44:22 +03:00
aml-build.c acpi: extend aml_and() to accept target argument 2015-12-22 18:39:21 +02:00
bios-linker-loader.c bios linker: validate pointer within table 2015-02-26 12:42:15 +01:00
core.c acpi: fix buffer overrun on migration 2015-11-19 15:26:00 +02:00
cpu_hotplug.c acpi: add acpi_send_gpe_event() to rise sci for hotplug 2015-06-03 18:19:16 +02:00
ich9.c hw/acpi/ich9: clean up stale comment about KVM not supporting SMM 2015-07-27 22:44:47 +03:00
Makefile.objs nvdimm acpi: build ACPI NFIT table 2015-12-22 18:39:20 +02:00
memory_hotplug.c nvdimm: implement NVDIMM device abstract 2015-12-22 18:39:20 +02:00
nvdimm.c nvdimm: fix header pointer in nvdimm_build_nfit() 2016-01-08 16:01:37 +02:00
pcihp.c acpi: add acpi_send_gpe_event() to rise sci for hotplug 2015-06-03 18:19:16 +02:00
piix4.c pc_piix: rename kvm_enabled to smm_enabled 2015-07-06 17:59:44 +02:00
tco.c ich9: implement strap SPKR pin logic 2015-07-08 10:09:55 +03:00