From patchwork Tue Nov 22 14:21:45 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Jones X-Patchwork-Id: 9441255 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 472DE6075F for ; Tue, 22 Nov 2016 14:21:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3AF762855C for ; Tue, 22 Nov 2016 14:21:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2FC8A2855A; Tue, 22 Nov 2016 14:21:57 +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=-6.9 required=2.0 tests=BAYES_00,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 B32692855E for ; Tue, 22 Nov 2016 14:21:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932468AbcKVOVx (ORCPT ); Tue, 22 Nov 2016 09:21:53 -0500 Received: from mx1.redhat.com ([209.132.183.28]:44458 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756156AbcKVOVv (ORCPT ); Tue, 22 Nov 2016 09:21:51 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A268E3F212 for ; Tue, 22 Nov 2016 14:21:51 +0000 (UTC) Received: from kamzik.brq.redhat.com (kamzik.brq.redhat.com [10.34.1.143]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id uAMELm1Z022698; Tue, 22 Nov 2016 09:21:50 -0500 From: Andrew Jones To: kvm@vger.kernel.org Cc: rkrcmar@redhat.com, thuth@redhat.com Subject: [kvm-unit-tests PATCH v2 1/2] report: add lock to report_abort Date: Tue, 22 Nov 2016 15:21:45 +0100 Message-Id: <1479824506-19690-2-git-send-email-drjones@redhat.com> In-Reply-To: <1479824506-19690-1-git-send-email-drjones@redhat.com> References: <1479824506-19690-1-git-send-email-drjones@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.30]); Tue, 22 Nov 2016 14:21:51 +0000 (UTC) Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Andrew Jones Reviewed-by: Thomas Huth --- lib/report.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/report.c b/lib/report.c index 4cd75534f978..2a8b6df1368d 100644 --- a/lib/report.c +++ b/lib/report.c @@ -118,12 +118,14 @@ void report_abort(const char *msg_fmt, ...) { va_list va; + spin_lock(&lock); puts("ABORT: "); puts(prefixes); va_start(va, msg_fmt); vprintf(msg_fmt, va); va_end(va); puts("\n"); + spin_unlock(&lock); report_summary(); abort(); }