From patchwork Thu May 31 17:12:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 137434 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp6877099lji; Thu, 31 May 2018 10:44:31 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLXqslukRkbRYUUDHVr8RmGNPOZntN5FvelZzgRllYVnhhIHTxdXO8fYhM3SKQIFPMF5vXw X-Received: by 2002:a0c:81b2:: with SMTP id 47-v6mr7515048qvd.31.1527788671101; Thu, 31 May 2018 10:44:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527788671; cv=none; d=google.com; s=arc-20160816; b=qhYKaHCerIIDxHbmqA6EWpFlpksO2vh0ELLfmAK4VZ7y6sV+CqJysy6YEd0rttjNWt effGHQkB+kMYHGjOk+L4PZsE0S8IQCXue039dpAjgSc9na41wUU0XzIWoZNcXGxjrRpD 9cNzFpSgMu8mWvp1pBXCa3ncs2dyiJHb9gMvN1s5cR5jh3ekbPSZyjfSiIfaR699HiWT P6KcaALsDMJP5HHSYiHUng2EcdxZ/5DOGDGK32gCs4deYmPBjeeuRlQsHvHzQngyT+4H UUVFuAMTLziujc9tKj/4rRe/bFYdbmwOzhUGfkD1dulJbolChYjPVCKrvw/WaaZJTPmD Wxdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:to:from:arc-authentication-results; bh=zV7jmwdJuDRW6usSGsmbY18jvtoMQaiORUejT/Upgzc=; b=V4a2ymlS5Y2CySCIVV/jX7Tv2zMDHVSIVoS+6zEbUf72w1jkySGAcgviU6jxSG67Px PClWTM5ff+buFsoUi8THZ/W9+LZCQ8zn5vLviK+GwMmXhdUPFaxgtGYRRoNP1TIrfTh4 KE+qHJLQ9O7P+T8+3Rsh2zedWA89n2m0XWLsY6OKkbGgyHFNBT0slQEaLpYgdRi0ZcuF 31o/cHZUzJUfFnFyflg0wOl6RHn4fvWMTFWjU2OJp9sWpGn/Z3zSogwseUpZQgospYWo j/nbKiuvqoBHlJKEjLKAMp+mNGMbY2SSqVvh2v7yatSo9QfWLFVeJA2/L6aKNdAwEmj3 i8Xw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id 39-v6si1304170qkw.102.2018.05.31.10.44.30 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 31 May 2018 10:44:31 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1]:45425 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fORck-0002yW-JF for patch@linaro.org; Thu, 31 May 2018 13:44:30 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58705) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fOR8h-0003ol-1J for qemu-devel@nongnu.org; Thu, 31 May 2018 13:13:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fOR8g-0000M2-8Q for qemu-devel@nongnu.org; Thu, 31 May 2018 13:13:27 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:59684 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fOR8g-0000LR-3w for qemu-devel@nongnu.org; Thu, 31 May 2018 13:13:26 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C635040201A0; Thu, 31 May 2018 17:13:25 +0000 (UTC) Received: from donizetti.redhat.com (ovpn-117-47.ams2.redhat.com [10.36.117.47]) by smtp.corp.redhat.com (Postfix) with ESMTP id 323B62026DEF; Thu, 31 May 2018 17:13:25 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Thu, 31 May 2018 19:12:33 +0200 Message-Id: <20180531171253.21012-34-pbonzini@redhat.com> In-Reply-To: <20180531171253.21012-1-pbonzini@redhat.com> References: <20180531171253.21012-1-pbonzini@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Thu, 31 May 2018 17:13:25 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Thu, 31 May 2018 17:13:25 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'pbonzini@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PULL 33/53] exec.c: Initialize sa_flags passed to sigaction() 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: Peter Maydell Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Peter Maydell Coverity points out that in the user-only version of cpu_abort() we call sigaction() with a partially initialized struct sigaction (CID 1005351). Correct the omission. Signed-off-by: Peter Maydell Message-Id: <20180515182700.31736-1-peter.maydell@linaro.org> Signed-off-by: Paolo Bonzini --- exec.c | 1 + 1 file changed, 1 insertion(+) -- 2.17.0 diff --git a/exec.c b/exec.c index ffa1099547..bd8833fc9d 100644 --- a/exec.c +++ b/exec.c @@ -1124,6 +1124,7 @@ void cpu_abort(CPUState *cpu, const char *fmt, ...) struct sigaction act; sigfillset(&act.sa_mask); act.sa_handler = SIG_DFL; + act.sa_flags = 0; sigaction(SIGABRT, &act, NULL); } #endif