From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60752) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y9H0H-0004fx-Cl for qemu-devel@nongnu.org; Thu, 08 Jan 2015 12:36:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y9Gzw-0006ra-QI for qemu-devel@nongnu.org; Thu, 08 Jan 2015 12:36:13 -0500 Received: from e39.co.us.ibm.com ([32.97.110.160]:44792) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y9Gzw-0006rC-J4 for qemu-devel@nongnu.org; Thu, 08 Jan 2015 12:35:52 -0500 Received: from /spool/local by e39.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 8 Jan 2015 10:35:52 -0700 From: Michael Roth Date: Thu, 8 Jan 2015 11:34:08 -0600 Message-Id: <1420738472-23267-65-git-send-email-mdroth@linux.vnet.ibm.com> In-Reply-To: <1420738472-23267-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <1420738472-23267-1-git-send-email-mdroth@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 64/88] hw/ide/core.c: Prevent SIGSEGV during migration List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org From: Don Slutz The other callers to blk_set_enable_write_cache() in this file already check for s->blk == NULL. Signed-off-by: Don Slutz Reviewed-by: Paolo Bonzini Reviewed-by: Stefan Hajnoczi Message-id: 1416259239-13281-1-git-send-email-dslutz@verizon.com Cc: qemu-stable@nongnu.org Signed-off-by: Peter Maydell (cherry picked from commit 6b896ab261942f441a16836e3fa3c83f3f4488b9) Conflicts: hw/ide/core.c *removed dependency on 4be746345 Signed-off-by: Michael Roth --- hw/ide/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ide/core.c b/hw/ide/core.c index 7256592..fa4cafa 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -2299,7 +2299,7 @@ static int ide_drive_post_load(void *opaque, int version_id) { IDEState *s = opaque; - if (s->identify_set) { + if (s->bs && s->identify_set) { bdrv_set_enable_write_cache(s->bs, !!(s->identify_data[85] & (1 << 5))); } return 0; -- 1.9.1