throttle: acquire the ThrottleGroup lock in bdrv_swap()
bdrv_swap() touches the fields of a BlockDriverState that are
protected by the ThrottleGroup lock. Although those fields end up in
their original place, they are temporarily swapped in the process,
so there's a chance that an operation on a member of the same group
happening on a different thread can try to use them.
Signed-off-by: Alberto Garcia <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
Message-id:
d92dc40d7c4f1fc5cda5cbbf4ffb7a4670b79d17.
1433779731[email protected]
Signed-off-by: Stefan Hajnoczi <[email protected]>