On Thu, Feb 26, 2026 at 02:59:58PM +0100, [email protected] wrote:
> From: Marc-André Lureau <[email protected]>
> 
> ram_block_attributes_destroy() was called from reclaim_ramblock(), which
> runs as an RCU callback deferred by call_rcu().
> 
> However,when the RamDiscardManager is finalized, it will assert that its
> source_list is empty in the next commit. Since the RCU callback hasn't
> run yet, the source added by ram_block_attributes_create() is still
> attached.
> 
> Move ram_block_attributes_destroy() into qemu_ram_free() so the source
> is removed synchronously. This is safe because qemu_ram_free() during
> shutdown runs after pause_all_vcpus(), so no vCPU thread can
> concurrently access the attributes via kvm_convert_memory().
> 
> Signed-off-by: Marc-André Lureau <[email protected]>

Reviewed-by: Peter Xu <[email protected]>

-- 
Peter Xu


Reply via email to