From patchwork Fri Mar 11 09:53:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Dr. David Alan Gilbert" X-Patchwork-Id: 596111 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 33EC1140321 for ; Fri, 11 Mar 2016 20:54:11 +1100 (AEDT) Received: from localhost ([::1]:53685 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aeJlp-0006Wt-6n for incoming@patchwork.ozlabs.org; Fri, 11 Mar 2016 04:54:09 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46923) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aeJlQ-0005mm-Bl for qemu-devel@nongnu.org; Fri, 11 Mar 2016 04:53:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aeJlN-0005eT-Fb for qemu-devel@nongnu.org; Fri, 11 Mar 2016 04:53:44 -0500 Received: from mx1.redhat.com ([209.132.183.28]:50982) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aeJlN-0005eM-AY for qemu-devel@nongnu.org; Fri, 11 Mar 2016 04:53:41 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id D220D65406 for ; Fri, 11 Mar 2016 09:53:40 +0000 (UTC) Received: from dgilbert-t530.redhat.com (ovpn-116-79.ams2.redhat.com [10.36.116.79]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u2B9rbtd027050; Fri, 11 Mar 2016 04:53:39 -0500 From: "Dr. David Alan Gilbert (git)" To: qemu-devel@nongnu.org, amit.shah@redhat.com, quintela@redhat.com, jdenemar@redhat.com Date: Fri, 11 Mar 2016 09:53:35 +0000 Message-Id: <1457690016-9070-2-git-send-email-dgilbert@redhat.com> In-Reply-To: <1457690016-9070-1-git-send-email-dgilbert@redhat.com> References: <1457690016-9070-1-git-send-email-dgilbert@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Fri, 11 Mar 2016 09:53:40 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v2 1/2] postcopy: listen thread is never joined X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: "Dr. David Alan Gilbert" We don't join the listen thread, it does its own cleanup. Mark as detached not joinable. Signed-off-by: Dr. David Alan Gilbert Reported-by: Paolo Bonzini Reviewed-by: Eric Blake --- migration/savevm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration/savevm.c b/migration/savevm.c index 384e872..0a33c22 100644 --- a/migration/savevm.c +++ b/migration/savevm.c @@ -1494,7 +1494,7 @@ static int loadvm_postcopy_handle_listen(MigrationIncomingState *mis) qemu_sem_init(&mis->listen_thread_sem, 0); qemu_thread_create(&mis->listen_thread, "postcopy/listen", postcopy_ram_listen_thread, mis->from_src_file, - QEMU_THREAD_JOINABLE); + QEMU_THREAD_DETACHED); qemu_sem_wait(&mis->listen_thread_sem); qemu_sem_destroy(&mis->listen_thread_sem);