Message ID | 156688661263.3027.3336339084032447737.malone@chaenomeles.canonical.com |
---|---|
State | New |
Headers | show |
Series | [Bug,1839428] Re: qemu core dumped when repeat "system_reset" multiple times during guest boot | expand |
diff --git a/block.c b/block.c index 4ad0e90d7e..0c12632661 100644 --- a/block.c +++ b/block.c @@ -5265,6 +5265,10 @@ void bdrv_set_aio_context(BlockDriverState *bs, AioContext *new_context) { AioContext *ctx = bdrv_get_aio_context(bs); + if (ctx == new_context) { + return; + } + aio_disable_external(ctx); bdrv_parent_drained_begin(bs, NULL, false); bdrv_drain(bs); /* ensure there are no in-flight requests */