qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] qcow: initialize coroutine mutex
@ 2011-08-11 21:27 Scott Wood
  2011-08-12  8:06 ` Kevin Wolf
  0 siblings, 1 reply; 2+ messages in thread
From: Scott Wood @ 2011-08-11 21:27 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kevin Wolf, Alexander Graf

commit 52b8eb60132b27ad53476490e9d7579003390cfa added a mutex,
but never initialized it.  This caused a segfault.

Reported-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Scott Wood <scottwood@freescale.com>
---
 block/qcow.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/block/qcow.c b/block/qcow.c
index 6447c2a..e46f15f 100644
--- a/block/qcow.c
+++ b/block/qcow.c
@@ -159,6 +159,8 @@ static int qcow_open(BlockDriverState *bs, int flags)
             goto fail;
         bs->backing_file[len] = '\0';
     }
+
+    qemu_co_mutex_init(&s->lock);
     return 0;
 
  fail:
-- 
1.7.6

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

end of thread, other threads:[~2011-08-12  8:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-11 21:27 [Qemu-devel] [PATCH] qcow: initialize coroutine mutex Scott Wood
2011-08-12  8:06 ` Kevin Wolf

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