diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2018-09-12 19:10:38 +0200 |
|---|---|---|
| committer | Fam Zheng <famz@redhat.com> | 2018-09-26 10:46:21 +0800 |
| commit | d7be5dd19c0df7f76e1b42f0c2cbbabefa1974cb (patch) | |
| tree | be99efc03f1c05806d4e180b2f4feb1166dfa975 /linux-user/syscall.c | |
| parent | c5e4e49258e9b89cb34c085a419dd9f862935c48 (diff) | |
| download | focaccia-qemu-d7be5dd19c0df7f76e1b42f0c2cbbabefa1974cb.tar.gz focaccia-qemu-d7be5dd19c0df7f76e1b42f0c2cbbabefa1974cb.zip | |
aio-posix: fix concurrent access to poll_disable_cnt
It is valid for an aio_set_fd_handler to happen concurrently with aio_poll. In that case, poll_disable_cnt can change under the heels of aio_poll, and the assertion on poll_disable_cnt can fail in run_poll_handlers. Therefore, this patch simply checks the counter on every polling iteration. There are no particular needs for ordering, since the polling loop is terminated anyway by aio_notify at the end of aio_set_fd_handler. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20180912171040.1732-2-pbonzini@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Fam Zheng <famz@redhat.com>
Diffstat (limited to 'linux-user/syscall.c')
0 files changed, 0 insertions, 0 deletions