From nobody Tue Apr 16 22:12:46 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1526408892145185.21866472329884; Tue, 15 May 2018 11:28:12 -0700 (PDT) Received: from localhost ([::1]:53040 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fIeg4-0005Mr-UK for importer@patchew.org; Tue, 15 May 2018 14:28:00 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55999) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fIefA-000518-Mm for qemu-devel@nongnu.org; Tue, 15 May 2018 14:27:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fIefA-0001di-0x for qemu-devel@nongnu.org; Tue, 15 May 2018 14:27:04 -0400 Received: from orth.archaic.org.uk ([2001:8b0:1d0::2]:41732) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fIef9-0001dS-QG for qemu-devel@nongnu.org; Tue, 15 May 2018 14:27:03 -0400 Received: from pm215 by orth.archaic.org.uk with local (Exim 4.89) (envelope-from ) id 1fIef7-0001iL-Gh; Tue, 15 May 2018 19:27:01 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Tue, 15 May 2018 19:27:00 +0100 Message-Id: <20180515182700.31736-1-peter.maydell@linaro.org> X-Mailer: git-send-email 2.17.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2001:8b0:1d0::2 Subject: [Qemu-devel] [PATCH] 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: Paolo Bonzini , patches@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- exec.c | 1 + 1 file changed, 1 insertion(+) 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 =3D SIG_DFL; + act.sa_flags =3D 0; sigaction(SIGABRT, &act, NULL); } #endif --=20 2.17.0