qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [BUGFIX][PATCH for 2.2 1/1] hw/ide/core.c: Prevent SIGSEGV during migration
@ 2014-11-17 21:20 Don Slutz
  2014-11-18 10:05 ` Paolo Bonzini
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Don Slutz @ 2014-11-17 21:20 UTC (permalink / raw)
  To: qemu-devel, qemu-stable
  Cc: Kevin Wolf, Don Slutz, Stefan Hajnoczi, Stefano Stabellini

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>
---

I think this is a bugfix that should be back ported to stable
releases.

I also think this should be done in xen's copy of QEMU for 4.5 with
back port(s) to active stable releases.

Note: In 2.1 and earlier the routine is
bdrv_set_enable_write_cache(); variable is s->bs.

 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 00e21cf..d4af5e2 100644
--- a/hw/ide/core.c
+++ b/hw/ide/core.c
@@ -2401,7 +2401,7 @@ static int ide_drive_post_load(void *opaque, int version_id)
 {
     IDEState *s = opaque;
 
-    if (s->identify_set) {
+    if (s->blk && s->identify_set) {
         blk_set_enable_write_cache(s->blk, !!(s->identify_data[85] & (1 << 5)));
     }
     return 0;
-- 
1.8.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2014-11-25 11:11 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-17 21:20 [Qemu-devel] [BUGFIX][PATCH for 2.2 1/1] hw/ide/core.c: Prevent SIGSEGV during migration Don Slutz
2014-11-18 10:05 ` Paolo Bonzini
2014-11-18 11:37 ` Stefan Hajnoczi
2014-11-18 11:41 ` Kevin Wolf
2014-11-18 18:00   ` Peter Maydell
2014-11-18 14:12 ` Stefano Stabellini
2014-11-19 12:29 ` Markus Armbruster
2014-11-20 18:31   ` Don Slutz
2014-11-21  8:42     ` Markus Armbruster
2014-11-21 10:49       ` Dr. David Alan Gilbert
2014-11-25  0:48         ` Don Slutz
2014-11-25  8:59           ` Dr. David Alan Gilbert
2014-11-25 11:11             ` Markus Armbruster

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).