summaryrefslogtreecommitdiffstats
path: root/linux-user/linux_loop.h
diff options
context:
space:
mode:
authorHaozhong Zhang2016-10-19 11:19:25 +0200
committerMichael S. Tsirkin2016-11-01 18:21:09 +0100
commit53000638f233d6ba1d584a68b74f2cde79615b80 (patch)
treeb450c7bfb462c17ce38fa779a0241eb7e6afa6a9 /linux-user/linux_loop.h
parentacpi/ipmi: Initialize the fwinfo before fetching it (diff)
downloadqemu-53000638f233d6ba1d584a68b74f2cde79615b80.tar.gz
qemu-53000638f233d6ba1d584a68b74f2cde79615b80.tar.xz
qemu-53000638f233d6ba1d584a68b74f2cde79615b80.zip
acpi: fix assert failure caused by commit 35c5a52d
Commit 35c5a52d "acpi: do not use TARGET_PAGE_SIZE" changed struct NvdimmDsmIn from a variable-size structure to a fixed-size structure of 4096 bytes. It forgot to adjust an assert in nvdimm_dsm_set_label_data(..., NvdimmDsmIn *in, ...): assert(sizeof(*in) + sizeof(*set_label_data) + set_label_data->length <= 4096); which could crash QEMU when guest writes NVDIMM labels. Fix it by replacing sizeof(*in) by offsetof(NvdimmDsmIn, arg3). Signed-off-by: Haozhong Zhang <haozhong.zhang@intel.com> Reported-by: Dan Williams <dan.j.williams@intel.com> Tested-by: Dan Williams <dan.j.williams@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>
Diffstat (limited to 'linux-user/linux_loop.h')
0 files changed, 0 insertions, 0 deletions