Message ID | 1400245203-32005-1-git-send-email-peter.maydell@linaro.org |
---|---|
State | Superseded |
Headers | show
Return-Path: <patchwork-forward+bncBC6Z756YVMIBBV4X3CNQKGQE3KUOH4Q@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f69.google.com (mail-oa0-f69.google.com [209.85.219.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id F05AD202E4 for <linaro@patches.linaro.org>; Fri, 16 May 2014 13:00:07 +0000 (UTC) Received: by mail-oa0-f69.google.com with SMTP id i7sf12625385oag.8 for <linaro@patches.linaro.org>; Fri, 16 May 2014 06:00:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=ug6a1xkIPDL2juFnxWpw7p2IJwlxmAIjlgpdfXgDRHQ=; b=Ca3JHGGzcppKBrz5cGds+qQcB79Pm81EeECA0gxuxBaJCAzoBZF9QzOpB1qPxcLmq/ 1B/h9pYdMlHs+GZK67WCFH+69vcyo8q25eebAP4WCQG131KR9BvAzbDzqWrdIv+kGIj/ cXBmRkKhV9NLPFqoc2sSZT8fLws5XqgSxRzWZVn+QqYnTraAqq9te6E/zi2Dr4NAhHpa kzUXD1Rsy0IX7bn3fyivUZhzzNDEHERc8DV5eEBfyITkEMpmRubldaR73Wge95GdD6I4 2gOvaTyTufzPYn8FIGsOQ6kL/aJDUF6stQwXNvlbVxDQNIkQy7pQGP4mY5GtIoomYhBF rmrA== X-Gm-Message-State: ALoCoQk9MFkM7jl6ajF6QtSUlzkyi2lZ4aXJ1ioj2Uskf8yL5ZJxjdJlNWszNe/zhr46u+c1ikh7 X-Received: by 10.50.130.102 with SMTP id od6mr3867311igb.0.1400245207607; Fri, 16 May 2014 06:00:07 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.32.203 with SMTP id h69ls664688qgh.56.gmail; Fri, 16 May 2014 06:00:07 -0700 (PDT) X-Received: by 10.220.10.2 with SMTP id n2mr14023241vcn.26.1400245207520; Fri, 16 May 2014 06:00:07 -0700 (PDT) Received: from mail-vc0-f172.google.com (mail-vc0-f172.google.com [209.85.220.172]) by mx.google.com with ESMTPS id v2si1561282vet.142.2014.05.16.06.00.07 for <patchwork-forward@linaro.org> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 16 May 2014 06:00:07 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.172 as permitted sender) client-ip=209.85.220.172; Received: by mail-vc0-f172.google.com with SMTP id hr9so6122759vcb.17 for <patchwork-forward@linaro.org>; Fri, 16 May 2014 06:00:07 -0700 (PDT) X-Received: by 10.220.166.211 with SMTP id n19mr36422vcy.69.1400245207323; Fri, 16 May 2014 06:00:07 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp50689vcb; Fri, 16 May 2014 06:00:06 -0700 (PDT) X-Received: by 10.194.219.164 with SMTP id pp4mr13996553wjc.19.1400245206035; Fri, 16 May 2014 06:00:06 -0700 (PDT) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [2001:8b0:1d0::1]) by mx.google.com with ESMTPS id x10si1106987wjf.93.2014.05.16.06.00.05 for <patches@linaro.org> (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 16 May 2014 06:00:06 -0700 (PDT) Received-SPF: none (google.com: pm215@archaic.org.uk does not designate permitted sender hosts) client-ip=2001:8b0:1d0::1; Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from <pm215@archaic.org.uk>) id 1WlHk3-0008Kg-Uf; Fri, 16 May 2014 14:00:03 +0100 From: Peter Maydell <peter.maydell@linaro.org> To: qemu-devel@nongnu.org Cc: patches@linaro.org, qemu-trivial@nongnu.org Subject: [PATCH] iohandler.c: Properly initialize sigaction struct Date: Fri, 16 May 2014 14:00:03 +0100 Message-Id: <1400245203-32005-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.172 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: <patchwork-forward.linaro.org> X-Google-Group-Id: 836684582541 List-Post: <http://groups.google.com/a/linaro.org/group/patchwork-forward/post>, <mailto:patchwork-forward@linaro.org> List-Help: <http://support.google.com/a/linaro.org/bin/topic.py?topic=25838>, <mailto:patchwork-forward+help@linaro.org> List-Archive: <http://groups.google.com/a/linaro.org/group/patchwork-forward/> List-Unsubscribe: <http://groups.google.com/a/linaro.org/group/patchwork-forward/subscribe>, <mailto:googlegroups-manage+836684582541+unsubscribe@googlegroups.com> |
diff --git a/iohandler.c b/iohandler.c index ae2ef8f..cca614f 100644 --- a/iohandler.c +++ b/iohandler.c @@ -191,6 +191,7 @@ static void qemu_init_child_watch(void) struct sigaction act; sigchld_bh = qemu_bh_new(sigchld_bh_handler, NULL); + memset(&act, 0, sizeof(act)); act.sa_handler = sigchld_handler; act.sa_flags = SA_NOCLDSTOP; sigaction(SIGCHLD, &act, NULL);
The code in qemu_init_child_watch() wasn't clearing the 'struct sigaction' before passing it to sigaction(); this meant that we would block a random set of signals while executing the SIGCHLD handler. Initialize properly by using memset() on the struct, as we do in similar cases elsewhere. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> --- Pretty harmless, but spotted by coverity. iohandler.c | 1 + 1 file changed, 1 insertion(+)