Hi, this patch fixes the crash reported by Anton Nefedov here:
https://lists.gnu.org/archive/html/qemu-block/2017-11/msg00159.html I can reproduce it easily with the change he mentions there, or by tweaking iotest 030 as I show here: https://lists.gnu.org/archive/html/qemu-block/2017-11/msg00934.html I'm not convinced that this is the best solution, though. As Fam says the block layer is getting complex and I think this can be solved in a different way if the code is properly rewritten. Even with this solution I think it would make sense to assert that the block job's pause count is always 0 when the job is about to be destroyed and perhaps keep a reference while it's being paused. But that's a bigger change and we're close to the release so I opted for this more conservative approach. Regards, Berto Alberto Garcia (1): blockjob: Make block_job_pause_all() keep a reference to the jobs blockjob.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) -- 2.11.0