From patchwork Fri May 3 17:08:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Przywara X-Patchwork-Id: 10929045 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 3916C1390 for ; Fri, 3 May 2019 17:08:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 286FA205AD for ; Fri, 3 May 2019 17:08:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 19BDA2859F; Fri, 3 May 2019 17:08:32 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B096A205AD for ; Fri, 3 May 2019 17:08:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727628AbfECRIa (ORCPT ); Fri, 3 May 2019 13:08:30 -0400 Received: from foss.arm.com ([217.140.101.70]:37502 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726391AbfECRIa (ORCPT ); Fri, 3 May 2019 13:08:30 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id BD27915A2; Fri, 3 May 2019 10:08:29 -0700 (PDT) Received: from donnerap.arm.com (donnerap.cambridge.arm.com [10.1.197.44]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id EB9E03F557; Fri, 3 May 2019 10:08:28 -0700 (PDT) From: Andre Przywara To: Will Deacon Cc: kvm@vger.kernel.org Subject: [PATCH kvmtool 0/2] Automatically clean up ghost socket files Date: Fri, 3 May 2019 18:08:19 +0100 Message-Id: <20190503170821.260705-1-andre.przywara@arm.com> X-Mailer: git-send-email 2.17.1 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP kvmtool is creating UNIX socket inodes to communicate between a running instance and a debug command issued by another lkvm process. When kvmtool (or the kernel) crashes, those files are not cleaned up and cause all kind of annoyances. Those two patches delete leftover socket files on calling "lkvm list", also remove an existing one (then reusing the same name) when creating a guest. This avoids random breakages when running kvmtool, and helps to run it from scripts. Cheers, Andre Andre Przywara (2): list: Clean up ghost socket files run: Check for ghost socket file upon VM creation kvm-ipc.c | 44 ++++++++++++++++++++++++++++++++++++-------- 1 file changed, 36 insertions(+), 8 deletions(-)