qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] do not call monitor_resume() from migrate_fd_put_buffer() error path
@ 2011-08-03 14:51 Michael Tokarev
  2011-08-04 19:24 ` Luiz Capitulino
  0 siblings, 1 reply; 13+ messages in thread
From: Michael Tokarev @ 2011-08-03 14:51 UTC (permalink / raw)
  To: Luiz Capitulino; +Cc: Jan Kiszka, Michael Tokarev, qemu-devel

If we do, it results in double monitor_resume() (second being called
from migrate_fd_cleanup() anyway) and monitor suspend count becoming
negative.

Signed-Off-By: Michael Tokarev <mjt@tls.msk.ru>
Reviewed-By: Jan Kiszka <jan.kiszka@siemens.com>
---
 migration.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/migration.c b/migration.c
index 2a15b98..7ca883f 100644
--- a/migration.c
+++ b/migration.c
@@ -330,9 +330,6 @@ ssize_t migrate_fd_put_buffer(void *opaque, const void *data, size_t size)
     if (ret == -EAGAIN) {
         qemu_set_fd_handler2(s->fd, NULL, NULL, migrate_fd_put_notify, s);
     } else if (ret < 0) {
-        if (s->mon) {
-            monitor_resume(s->mon);
-        }
         s->state = MIG_STATE_ERROR;
         notifier_list_notify(&migration_state_notifiers, NULL);
     }
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 13+ messages in thread
* [Qemu-devel] [PATCH] do not call monitor_resume() from migrate_fd_put_buffer() error path
@ 2011-07-19 11:46 Michael Tokarev
  2011-07-19 21:48 ` Jan Kiszka
  0 siblings, 1 reply; 13+ messages in thread
From: Michael Tokarev @ 2011-07-19 11:46 UTC (permalink / raw)
  To: qemu-devel; +Cc: Michael Tokarev, Marcelo Tosatti, Jan Kiszka

If we do, it results in double monitor_resume() (second being called
from migrate_fd_cleanup() anyway) and monitor suspend count becoming
negative.

Cc'ing people from `git blame' list for the lines in question: the
change fixes the problem but I'm not sure what the original intention
of this code was in this place.  Unfortunately noone replied to two
my attempts to raise this issue.

Signed-Off-By: Michael Tokarev <mjt@tls.msk.ru>
---
 migration.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/migration.c b/migration.c
index af3a1f2..115588c 100644
--- a/migration.c
+++ b/migration.c
@@ -330,9 +330,6 @@ ssize_t migrate_fd_put_buffer(void *opaque, const void *data, size_t size)
     if (ret == -EAGAIN) {
         qemu_set_fd_handler2(s->fd, NULL, NULL, migrate_fd_put_notify, s);
     } else if (ret < 0) {
-        if (s->mon) {
-            monitor_resume(s->mon);
-        }
         s->state = MIG_STATE_ERROR;
         notifier_list_notify(&migration_state_notifiers);
     }
-- 
1.7.2.5

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

end of thread, other threads:[~2011-08-05  7:11 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-03 14:51 [Qemu-devel] [PATCH] do not call monitor_resume() from migrate_fd_put_buffer() error path Michael Tokarev
2011-08-04 19:24 ` Luiz Capitulino
2011-08-04 19:52   ` Michael Tokarev
2011-08-04 20:00     ` Michael Tokarev
2011-08-04 22:19       ` Jan Kiszka
2011-08-05  6:51         ` Michael Tokarev
2011-08-05  7:11           ` Jan Kiszka
  -- strict thread matches above, loose matches on Subject: below --
2011-07-19 11:46 Michael Tokarev
2011-07-19 21:48 ` Jan Kiszka
2011-07-20 16:34   ` Marcelo Tosatti
2011-07-20 22:06     ` Jan Kiszka
2011-08-03  7:38       ` Michael Tokarev
2011-08-03 13:22         ` Jan Kiszka

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