summaryrefslogtreecommitdiffstats
path: root/scripts/clean-includes
diff options
context:
space:
mode:
authorRaphael Norwitz2022-01-17 05:12:34 +0100
committerMichael S. Tsirkin2022-02-04 15:07:43 +0100
commitb906a23c33673f790a67dbd631a244387be77cb5 (patch)
tree0b3feab2ee662b87eee242065d4c26bc43a79d45 /scripts/clean-includes
parentlibvhost-user: fix VHOST_USER_REM_MEM_REG not closing the fd (diff)
downloadqemu-b906a23c33673f790a67dbd631a244387be77cb5.tar.gz
qemu-b906a23c33673f790a67dbd631a244387be77cb5.tar.xz
qemu-b906a23c33673f790a67dbd631a244387be77cb5.zip
libvhost-user: prevent over-running max RAM slots
When VHOST_USER_PROTOCOL_F_CONFIGURE_MEM_SLOTS support was added to libvhost-user, no guardrails were added to protect against QEMU attempting to hot-add too many RAM slots to a VM with a libvhost-user based backed attached. This change adds the missing error handling by introducing a check on the number of RAM slots the device has available before proceeding to process the VHOST_USER_ADD_MEM_REG message. Suggested-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Raphael Norwitz <raphael.norwitz@nutanix.com> Message-Id: <20220117041050.19718-6-raphael.norwitz@nutanix.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: David Hildenbrand <david@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Diffstat (limited to 'scripts/clean-includes')
0 files changed, 0 insertions, 0 deletions