qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 for-7.1 1/9] nbd: safeguard against waking up invalid coro


From: Vladimir Sementsov-Ogievskiy
Subject: Re: [PATCH v2 for-7.1 1/9] nbd: safeguard against waking up invalid coroutine
Date: Fri, 15 Apr 2022 12:53:57 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0

14.04.2022 20:57, Paolo Bonzini wrote:
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>

Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@openvz.org>

--
Best regards,
Vladimir



reply via email to

[Prev in Thread] Current Thread [Next in Thread]