diff options
author | Kevin Wolf <kwolf@redhat.com> | 2013-03-27 17:28:18 +0100 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2013-03-28 11:58:40 +0100 |
commit | 5d186eb03eb37b257e29a4731ca484362d5fc4e4 (patch) | |
tree | ffa427b0c9df054073f6b9fb17b016697a9339dc /migration-fd.c | |
parent | ecdd5333ab9ed3f2b848066aaaef02c027b25e36 (diff) |
block: Fix direct use of protocols as driver for bdrv_open()
bdrv_open_common() implements direct use of protocols by copying the
pre-opened BlockDriverStates to bs using bdrv_swap(). It did however
first set some fields in bs, which end up in file after the swap. When
bdrv_open() destroys file, it appears to be open, and because it isn't,
qemu could segfault while trying to close it.
Reorder the operations to return immediately in such cases so that file
is correctly detected as closed.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'migration-fd.c')
0 files changed, 0 insertions, 0 deletions