From patchwork Thu Feb 7 13:23:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alberto Garcia X-Patchwork-Id: 10801209 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 70CE46C2 for ; Thu, 7 Feb 2019 13:25:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 618262897C for ; Thu, 7 Feb 2019 13:25:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5FF0628E17; Thu, 7 Feb 2019 13:25:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 145FC2D778 for ; Thu, 7 Feb 2019 13:25:23 +0000 (UTC) Received: from localhost ([127.0.0.1]:39986 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1grjgA-0001Hb-DF for patchwork-qemu-devel@patchwork.kernel.org; Thu, 07 Feb 2019 08:25:22 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49412) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1grjew-0001ES-3I for qemu-devel@nongnu.org; Thu, 07 Feb 2019 08:24:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1grjev-0004D0-I7 for qemu-devel@nongnu.org; Thu, 07 Feb 2019 08:24:06 -0500 Received: from fanzine.igalia.com ([91.117.99.155]:59531) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1grjev-000407-8O for qemu-devel@nongnu.org; Thu, 07 Feb 2019 08:24:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Message-Id:Date:Subject:Cc:To:From; bh=02OM2hSyHKX1H9RojqvmbOtULUF/KR7VKziQfkcG2uM=; b=DDbNQLrYEyhYjOHTycjH9chDQotKPV7cOFnlwsa6Eg2Ht4of14Kls7MZJXghQCIUdgIRd2CLnfh8nTlz8h/54yy9PAnqzcFIskwlbQfa6xNPL+pxz39kXwaWjAEaIMaM+3RDLmVNgTTRvuWoQsw2vPzdXhheQdFcwPtNgz21Nx3x8r2GHGWhHQPs1QqGvGC0ei+1TlwXHA0EgFIBq8FplDAfVhI90pSgvtXiKp0+UkFsSpZ+vRa1g4bTvo5h62+ObYPy9gF7Tamd9tzlu8aUtEZgSifssCrmUR7/nAWcnSnz0/P1WGFDjoVtrwZEUVJk+f38MBBbVUBLYuHvLOlrJQ==; Received: from 62-165-147-230.co.dnainternet.fi ([62.165.147.230] helo=perseus.local) by fanzine.igalia.com with esmtpsa (Cipher TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim) id 1grjeX-0003gh-Og; Thu, 07 Feb 2019 14:23:41 +0100 Received: from berto by perseus.local with local (Exim 4.89) (envelope-from ) id 1grjeK-0003A1-Mv; Thu, 07 Feb 2019 15:23:28 +0200 From: Alberto Garcia To: qemu-devel@nongnu.org Date: Thu, 7 Feb 2019 15:23:20 +0200 Message-Id: X-Mailer: git-send-email 2.11.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] [fuzzy] X-Received-From: 91.117.99.155 Subject: [Qemu-devel] [PATCH 0/3] char-socket: Fix race condition X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , Alberto Garcia , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Hi, this series fixes the crash I reported yesterday in char-socket and adds a new qemu_idle_add() function, fixing a couple of memory leaks along the way. Regards, Berto Alberto Garcia (3): main-loop: Don't leak GSources attached to a GMainContext main-loop: Add qemu_idle_add() char-socket: Lock tcp_chr_disconnect() and socket_reconnect_timeout() chardev/char-pty.c | 8 ++------ chardev/char-socket.c | 19 +++++++++++++++++-- include/qemu/main-loop.h | 8 ++++++++ io/task.c | 6 ++---- util/main-loop.c | 9 +++++++++ 5 files changed, 38 insertions(+), 12 deletions(-)