summaryrefslogtreecommitdiffstats
path: root/include/block
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2015-02-10 11:17:53 +0100
committerKevin Wolf <kwolf@redhat.com>2015-03-09 11:11:59 +0100
commit315a1309defd8ddf910c6c17e28cbbd7faf92f2e (patch)
tree9c43363b81766c220df0b0ad144044b3bdf2d802 /include/block
parent6608c7e9eb65727524f6f590b1e716ec6e7877d4 (diff)
downloadhqemu-315a1309defd8ddf910c6c17e28cbbd7faf92f2e.zip
hqemu-315a1309defd8ddf910c6c17e28cbbd7faf92f2e.tar.gz
coroutine: Fix use after free with qemu_coroutine_yield()
Instead of using the same function for entering and exiting coroutines, and hoping that it doesn't add any functionality that hurts with the parameters used for exiting, we can just directly call into the real task switch in qemu_coroutine_switch(). This fixes a use-after-free scenario where reentering a coroutine that has yielded still accesses the old parent coroutine (which may have meanwhile terminated) in the part of coroutine_swap() that follows qemu_coroutine_switch(). Cc: qemu-stable@nongnu.org Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/block')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud