qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL 0/3] Block patches for 1.1
@ 2012-05-14 15:44 Kevin Wolf
  2012-05-14 15:44 ` [Qemu-devel] [PATCH 1/3] coroutine: Fix setup of sigaltstack coroutines Kevin Wolf
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Kevin Wolf @ 2012-05-14 15:44 UTC (permalink / raw)
  To: anthony; +Cc: kwolf, qemu-devel

The following changes since commit 77f4c9a68aedb9b0d290a1def1bfc8714be862ec:

  Merge remote-tracking branch 'origin/master' into staging (2012-05-14 08:44:32 -0500)

are available in the git repository at:

  git://repo.or.cz/qemu/kevin.git for-anthony

Charles Arnold (1):
      qemu-img: Fix segmentation fault

Jan Kiszka (1):
      coroutine: Fix setup of sigaltstack coroutines

Kevin Wolf (1):
      qcow2: Don't ignore failure to clear autoclear flags

 block/qcow2.c           |    5 ++++-
 coroutine-sigaltstack.c |    2 +-
 qemu-img.c              |    4 +++-
 3 files changed, 8 insertions(+), 3 deletions(-)

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

* [Qemu-devel] [PATCH 1/3] coroutine: Fix setup of sigaltstack coroutines
  2012-05-14 15:44 [Qemu-devel] [PULL 0/3] Block patches for 1.1 Kevin Wolf
@ 2012-05-14 15:44 ` Kevin Wolf
  2012-05-14 15:44 ` [Qemu-devel] [PATCH 2/3] qcow2: Don't ignore failure to clear autoclear flags Kevin Wolf
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Kevin Wolf @ 2012-05-14 15:44 UTC (permalink / raw)
  To: anthony; +Cc: kwolf, qemu-devel

From: Jan Kiszka <jan.kiszka@siemens.com>

Use pthread_kill instead of process-wide kill to invoke the signal
handler used for stack switching. This may fix spurious lock-ups with
this backend, easily triggerable by extending the time window between
kill and sigsuspend.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 coroutine-sigaltstack.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/coroutine-sigaltstack.c b/coroutine-sigaltstack.c
index 7ff2d33..b2e316c 100644
--- a/coroutine-sigaltstack.c
+++ b/coroutine-sigaltstack.c
@@ -226,7 +226,7 @@ static Coroutine *coroutine_new(void)
      * called.
      */
     coTS->tr_called = 0;
-    kill(getpid(), SIGUSR2);
+    pthread_kill(pthread_self(), SIGUSR2);
     sigfillset(&sigs);
     sigdelset(&sigs, SIGUSR2);
     while (!coTS->tr_called) {
-- 
1.7.6.5

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

* [Qemu-devel] [PATCH 2/3] qcow2: Don't ignore failure to clear autoclear flags
  2012-05-14 15:44 [Qemu-devel] [PULL 0/3] Block patches for 1.1 Kevin Wolf
  2012-05-14 15:44 ` [Qemu-devel] [PATCH 1/3] coroutine: Fix setup of sigaltstack coroutines Kevin Wolf
@ 2012-05-14 15:44 ` Kevin Wolf
  2012-05-14 15:44 ` [Qemu-devel] [PATCH 3/3] qemu-img: Fix segmentation fault Kevin Wolf
  2012-05-14 20:09 ` [Qemu-devel] [PULL 0/3] Block patches for 1.1 Anthony Liguori
  3 siblings, 0 replies; 5+ messages in thread
From: Kevin Wolf @ 2012-05-14 15:44 UTC (permalink / raw)
  To: anthony; +Cc: kwolf, qemu-devel

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 block/qcow2.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/block/qcow2.c b/block/qcow2.c
index 3bae2d8..655799c 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -300,7 +300,10 @@ static int qcow2_open(BlockDriverState *bs, int flags)
 
     if (!bs->read_only && s->autoclear_features != 0) {
         s->autoclear_features = 0;
-        qcow2_update_header(bs);
+        ret = qcow2_update_header(bs);
+        if (ret < 0) {
+            goto fail;
+        }
     }
 
     /* Check support for various header values */
-- 
1.7.6.5

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

* [Qemu-devel] [PATCH 3/3] qemu-img: Fix segmentation fault
  2012-05-14 15:44 [Qemu-devel] [PULL 0/3] Block patches for 1.1 Kevin Wolf
  2012-05-14 15:44 ` [Qemu-devel] [PATCH 1/3] coroutine: Fix setup of sigaltstack coroutines Kevin Wolf
  2012-05-14 15:44 ` [Qemu-devel] [PATCH 2/3] qcow2: Don't ignore failure to clear autoclear flags Kevin Wolf
@ 2012-05-14 15:44 ` Kevin Wolf
  2012-05-14 20:09 ` [Qemu-devel] [PULL 0/3] Block patches for 1.1 Anthony Liguori
  3 siblings, 0 replies; 5+ messages in thread
From: Kevin Wolf @ 2012-05-14 15:44 UTC (permalink / raw)
  To: anthony; +Cc: kwolf, qemu-devel

From: Charles Arnold <carnold@suse.com>

The following command generates a segmentation fault.
qemu-img convert -O vpc -o ? test test2
This is because the 'goto out;' statement calls qemu_progress_end
before qemu_progress_init is called resulting in a NULL pointer
invocation.

Signed-off-by: Charles Arnold <carnold@suse.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 qemu-img.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/qemu-img.c b/qemu-img.c
index 5434ddc..c8a70ff 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -712,6 +712,9 @@ static int img_convert(int argc, char **argv)
 
     out_filename = argv[argc - 1];
 
+    /* Initialize before goto out */
+    qemu_progress_init(progress, 2.0);
+
     if (options && !strcmp(options, "?")) {
         ret = print_block_option_help(out_filename, out_fmt);
         goto out;
@@ -724,7 +727,6 @@ static int img_convert(int argc, char **argv)
         goto out;
     }
 
-    qemu_progress_init(progress, 2.0);
     qemu_progress_print(0, 100);
 
     bs = g_malloc0(bs_n * sizeof(BlockDriverState *));
-- 
1.7.6.5

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

* Re: [Qemu-devel] [PULL 0/3] Block patches for 1.1
  2012-05-14 15:44 [Qemu-devel] [PULL 0/3] Block patches for 1.1 Kevin Wolf
                   ` (2 preceding siblings ...)
  2012-05-14 15:44 ` [Qemu-devel] [PATCH 3/3] qemu-img: Fix segmentation fault Kevin Wolf
@ 2012-05-14 20:09 ` Anthony Liguori
  3 siblings, 0 replies; 5+ messages in thread
From: Anthony Liguori @ 2012-05-14 20:09 UTC (permalink / raw)
  To: Kevin Wolf; +Cc: qemu-devel

On 05/14/2012 10:44 AM, Kevin Wolf wrote:
> The following changes since commit 77f4c9a68aedb9b0d290a1def1bfc8714be862ec:
>
>    Merge remote-tracking branch 'origin/master' into staging (2012-05-14 08:44:32 -0500)
>
> are available in the git repository at:
>
>    git://repo.or.cz/qemu/kevin.git for-anthony

Pulled.  Thanks.

Regards,

Anthony Liguori

>
> Charles Arnold (1):
>        qemu-img: Fix segmentation fault
>
> Jan Kiszka (1):
>        coroutine: Fix setup of sigaltstack coroutines
>
> Kevin Wolf (1):
>        qcow2: Don't ignore failure to clear autoclear flags
>
>   block/qcow2.c           |    5 ++++-
>   coroutine-sigaltstack.c |    2 +-
>   qemu-img.c              |    4 +++-
>   3 files changed, 8 insertions(+), 3 deletions(-)
>
>

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

end of thread, other threads:[~2012-05-14 20:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-14 15:44 [Qemu-devel] [PULL 0/3] Block patches for 1.1 Kevin Wolf
2012-05-14 15:44 ` [Qemu-devel] [PATCH 1/3] coroutine: Fix setup of sigaltstack coroutines Kevin Wolf
2012-05-14 15:44 ` [Qemu-devel] [PATCH 2/3] qcow2: Don't ignore failure to clear autoclear flags Kevin Wolf
2012-05-14 15:44 ` [Qemu-devel] [PATCH 3/3] qemu-img: Fix segmentation fault Kevin Wolf
2012-05-14 20:09 ` [Qemu-devel] [PULL 0/3] Block patches for 1.1 Anthony Liguori

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