From patchwork Fri Mar 11 12:32:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Shah X-Patchwork-Id: 8565381 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D9B6E9F38C for ; Fri, 11 Mar 2016 12:35:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4ED8F20340 for ; Fri, 11 Mar 2016 12:35:21 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A22A520253 for ; Fri, 11 Mar 2016 12:35:20 +0000 (UTC) Received: from localhost ([::1]:54538 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aeMHo-0003xb-2I for patchwork-qemu-devel@patchwork.kernel.org; Fri, 11 Mar 2016 07:35:20 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37231) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aeMFK-0000C5-Bu for qemu-devel@nongnu.org; Fri, 11 Mar 2016 07:32:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aeMFJ-0007p9-GZ for qemu-devel@nongnu.org; Fri, 11 Mar 2016 07:32:46 -0500 Received: from mx1.redhat.com ([209.132.183.28]:46233) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aeMFJ-0007p5-BC for qemu-devel@nongnu.org; Fri, 11 Mar 2016 07:32:45 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 0225932D3A3; Fri, 11 Mar 2016 12:32:44 +0000 (UTC) Received: from localhost (ovpn-113-127.phx2.redhat.com [10.3.113.127]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u2BCWhbK009052; Fri, 11 Mar 2016 07:32:44 -0500 From: Amit Shah To: Peter Maydell Date: Fri, 11 Mar 2016 18:02:13 +0530 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Juan Quintela , qemu list , peterx@redhat.com, "Dr. David Alan Gilbert" , Amit Shah , den@openvz.org Subject: [Qemu-devel] [PULL 3/4] 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Message-Id: <1457690016-9070-2-git-send-email-dgilbert@redhat.com> Signed-off-by: Amit Shah --- 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);