]> Git Repo - qemu.git/commit - hw/virtio/virtio-balloon.c
virtio-balloon: free pbp more aggressively
authorMichael S. Tsirkin <[email protected]>
Thu, 25 Jul 2019 11:54:25 +0000 (07:54 -0400)
committerMichael S. Tsirkin <[email protected]>
Thu, 25 Jul 2019 15:19:25 +0000 (11:19 -0400)
commit1b47b37c33ec01ae1efc527f4c97f97f93723bc4
treec70b28a0172c77bafd665a70b5f0c901c9380bb4
parent9a7ca8a7c920360db9dcaf616ca6f1440c025043
virtio-balloon: free pbp more aggressively

Previous patches switched to a temporary pbp but that does not go far
enough: after device uses a buffer, guest is free to reuse it, so
tracking the page and freeing it later is wrong.

Free and reset the pbp after we push each element.

Fixes: ed48c59875b6 ("virtio-balloon: Safely handle BALLOON_PAGE_SIZE < host page size")
Cc: [email protected] #v4.0.0
Cc: David Hildenbrand <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
hw/virtio/virtio-balloon.c
This page took 0.025856 seconds and 4 git commands to generate.