diff options
author | Don Slutz <dslutz@verizon.com> | 2014-11-17 16:20:39 -0500 |
---|---|---|
committer | Michael Roth <mdroth@linux.vnet.ibm.com> | 2015-01-07 14:57:45 -0600 |
commit | cd2f44cc3e75afd059d6a1b8a08ea6892bb8853b (patch) | |
tree | 24e3c90a5c90b18a535349055b528c06186afb61 | |
parent | 844470158c61645f6448fe2fd3963080cead44db (diff) | |
download | qemu-cd2f44cc3e75afd059d6a1b8a08ea6892bb8853b.tar.gz |
hw/ide/core.c: Prevent SIGSEGV during migration
The other callers to blk_set_enable_write_cache() in this file
already check for s->blk == NULL.
Signed-off-by: Don Slutz <dslutz@verizon.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 1416259239-13281-1-git-send-email-dslutz@verizon.com
Cc: qemu-stable@nongnu.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
(cherry picked from commit 6b896ab261942f441a16836e3fa3c83f3f4488b9)
Conflicts:
hw/ide/core.c
*removed dependency on 4be746345
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
-rw-r--r-- | hw/ide/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/ide/core.c b/hw/ide/core.c index 7256592ff6..fa4cafa71c 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; |