diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2022-04-14 19:57:48 +0200 |
|---|---|---|
| committer | Eric Blake <eblake@redhat.com> | 2022-04-26 13:16:24 -0500 |
| commit | 8846b7d1c137ba261b2300b20e94ae360d88a538 (patch) | |
| tree | 080561e4c89f8fc80509c21de37e40fc2a7052cb /hw/misc/pvpanic.c | |
| parent | c08c220be70603941b680d5b39f2061222dd74e8 (diff) | |
| download | focaccia-qemu-8846b7d1c137ba261b2300b20e94ae360d88a538.tar.gz focaccia-qemu-8846b7d1c137ba261b2300b20e94ae360d88a538.zip | |
nbd: safeguard against waking up invalid coroutine
The .reply_possible field of s->requests is never set to false. This is not a problem as it is only a safeguard to detect protocol errors, but it's sloppy. In fact, the field is actually not necessary at all, because .coroutine is set to NULL in NBD_FOREACH_REPLY_CHUNK after receiving the last chunk. Thus, replace .reply_possible with .coroutine and move the check before deciding the fate of this request. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20220414175756.671165-2-pbonzini@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@openvz.org> Reviewed-by: Lukas Straub <lukasstraub2@web.de> Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'hw/misc/pvpanic.c')
0 files changed, 0 insertions, 0 deletions