diff options
author | Stefan Hajnoczi <stefanha@redhat.com> | 2014-06-03 11:21:01 +0200 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2014-06-04 09:56:06 +0200 |
commit | 924fe1293c3e7a3c787bbdfb351e7f168caee3e9 (patch) | |
tree | 07e385b640afa86d2a411a2195e3a34bb5b52b91 /net/tap-linux.c | |
parent | e00fcfeab3d452cba3d0a08991a39ab15df66424 (diff) | |
download | qemu-924fe1293c3e7a3c787bbdfb351e7f168caee3e9.zip |
aio: fix qemu_bh_schedule() bh->ctx race condition
qemu_bh_schedule() is supposed to be thread-safe at least the first time
it is called. Unfortunately this is not quite true:
bh->scheduled = 1;
aio_notify(bh->ctx);
Since another thread may run the BH callback once it has been scheduled,
there is a race condition if the callback frees the BH before
aio_notify(bh->ctx) has a chance to run.
Reported-by: Stefan Priebe <s.priebe@profihost.ag>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Tested-by: Stefan Priebe <s.priebe@profihost.ag>
Diffstat (limited to 'net/tap-linux.c')
0 files changed, 0 insertions, 0 deletions