qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 64/88] hw/ide/core.c: Prevent SIGSEGV during migrati


From: Michael Roth
Subject: [Qemu-devel] [PATCH 64/88] hw/ide/core.c: Prevent SIGSEGV during migration
Date: Thu, 8 Jan 2015 11:34:08 -0600

From: Don Slutz <address@hidden>

The other callers to blk_set_enable_write_cache() in this file
already check for s->blk == NULL.

Signed-off-by: Don Slutz <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Message-id: address@hidden
Cc: address@hidden
Signed-off-by: Peter Maydell <address@hidden>
(cherry picked from commit 6b896ab261942f441a16836e3fa3c83f3f4488b9)

Conflicts:
        hw/ide/core.c

*removed dependency on 4be746345

Signed-off-by: Michael Roth <address@hidden>
---
 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]