From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55910) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYVCf-0003Py-AB for qemu-devel@nongnu.org; Wed, 24 Feb 2016 03:53:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aYVCb-0005T1-8M for qemu-devel@nongnu.org; Wed, 24 Feb 2016 03:53:49 -0500 Received: from mailhub.sw.ru ([195.214.232.25]:14640 helo=relay.sw.ru) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYVCa-0005Sj-Rl for qemu-devel@nongnu.org; Wed, 24 Feb 2016 03:53:45 -0500 From: "Denis V. Lunev" Date: Wed, 24 Feb 2016 11:53:37 +0300 Message-Id: <1456304019-10507-1-git-send-email-den@openvz.org> Subject: [Qemu-devel] [PATCH v4 0/2] move qcow2_invalidate_cache() out of coroutine context List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Amit Shah , "Denis V. Lunev" , Juan Quintela , qemu-devel@nongnu.org, Paolo Bonzini There is a possibility to hit an assert in qcow2_get_specific_info that s->qcow_version is undefined. This happens when VM in starting from suspended state, i.e. it processes incoming migration, and in the same time 'info block' is called. The problem is that qcow2_invalidate_cache() closes the image and memset()s BDRVQcowState in the middle. This operation should not be performed in coroutine context. Changes from v3: - added qemu_bh_delete at the end of BH to free allocated structure. Thanks to Fam. Changes from v2: - subject lines in patches Changes from v1: - fixed spelling. Eric, thank you for spell checking Signed-off-by: Denis V. Lunev CC: Paolo Bonzini CC: Juan Quintela CC: Amit Shah