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: 8563791 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 E171E9F9A0 for ; Fri, 11 Mar 2016 09:53:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5148920340 for ; Fri, 11 Mar 2016 09:53:54 +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 AA6F520328 for ; Fri, 11 Mar 2016 09:53:53 +0000 (UTC) Received: from localhost ([::1]:53682 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aeJlY-0005mz-QU for patchwork-qemu-devel@patchwork.kernel.org; Fri, 11 Mar 2016 04:53:52 -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+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=-5.9 required=5.0 tests=BAYES_00,HK_NAME_DR, RCVD_IN_DNSWL_HI,UNPARSEABLE_RELAY autolearn=ham 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 --- 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);