diff options
author | Eric Blake <eblake@redhat.com> | 2020-02-06 11:38:32 -0600 |
---|---|---|
committer | Eric Blake <eblake@redhat.com> | 2020-02-26 14:45:02 -0600 |
commit | 73e064ccf09d908febc83761addcc6e76feabf78 (patch) | |
tree | cd4438253ca07fa9769e07cc9f5f03a4fc38c5e7 /hmp-commands.hx | |
parent | db736e0437aa6fd7c1b7e4599c17f9619ab6b837 (diff) | |
download | qemu-73e064ccf09d908febc83761addcc6e76feabf78.zip |
nbd: Fix regression with multiple meta contexts
Detected by a hang in the libnbd testsuite. If a client requests
multiple meta contexts (both base:allocation and qemu:dirty-bitmap:x)
at the same time, our attempt to silence a false-positive warning
about a potential uninitialized variable introduced botched logic: we
were short-circuiting the second context, and never sending the
NBD_REPLY_FLAG_DONE. Combining two 'if' into one 'if/else' in
bdf200a55 was wrong (I'm a bit embarrassed that such a change was my
initial suggestion after the v1 patch, then I did not review the v2
patch that actually got committed). Revert that, and instead silence
the false positive warning by replacing 'return ret' with 'return 0'
(the value it always has at that point in the code, even though it
eluded the deduction abilities of the robot that reported the false
positive).
Fixes: bdf200a5535
Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <20200206173832.130004-1-eblake@redhat.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'hmp-commands.hx')
0 files changed, 0 insertions, 0 deletions