Re: [Qemu-block] [PATCH v2] blockjob: update nodes head while removing all bdrv

2019-09-10 Thread Sergio Lopez
Max Reitz writes: > On 10.09.19 15:36, Sergio Lopez wrote: >> block_job_remove_all_bdrv() iterates through job->nodes, calling >> bdrv_root_unref_child() for each entry. The call to the latter may >> reach child_job_[can_]set_aio_ctx(), which will also attempt to >> traverse job->nodes, potentia

Re: [Qemu-block] [PATCH v2] blockjob: update nodes head while removing all bdrv

2019-09-10 Thread Max Reitz
On 10.09.19 15:36, Sergio Lopez wrote: > block_job_remove_all_bdrv() iterates through job->nodes, calling > bdrv_root_unref_child() for each entry. The call to the latter may > reach child_job_[can_]set_aio_ctx(), which will also attempt to > traverse job->nodes, potentially finding entries that wh

[Qemu-block] [PATCH v2] blockjob: update nodes head while removing all bdrv

2019-09-10 Thread Sergio Lopez
block_job_remove_all_bdrv() iterates through job->nodes, calling bdrv_root_unref_child() for each entry. The call to the latter may reach child_job_[can_]set_aio_ctx(), which will also attempt to traverse job->nodes, potentially finding entries that where freed on previous iterations. To avoid thi