Home
last modified time | relevance | path

Searched hist:"8846 b7d1" (Results 1 – 1 of 1) sorted by relevance

/openbmc/qemu/block/
H A Dnbd.c8846b7d1 Thu Apr 14 12:57:48 CDT 2022 Paolo Bonzini <pbonzini@redhat.com> 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>