Message ID | 20240312184115.365415-6-richard.henderson@linaro.org |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a5d:604e:0:b0:33e:7753:30bd with SMTP id j14csp2169107wrt; Tue, 12 Mar 2024 11:42:17 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXFvRT5Vtjg0iNJ3Z8ma8KsLyoiHn2ip4YnVcksD7nkL3cVOcQpQ3KuTNOEt0MpyTiN0I/kkpAENbAi/h3JKmJZ X-Google-Smtp-Source: AGHT+IHk+YGIdhTIaecfJRCLn/mUxEsjJFp1eHeAo1oN7VpZiQeDR5drLdtX8jQZ6deNeyD3DaM2 X-Received: by 2002:ac8:5fcf:0:b0:42e:fd4d:8245 with SMTP id k15-20020ac85fcf000000b0042efd4d8245mr12224097qta.27.1710268936779; Tue, 12 Mar 2024 11:42:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1710268936; cv=none; d=google.com; s=arc-20160816; b=i7XjYE8/m6TPlgni7TZPOeOtNQPoEcQlfglYIyF5aSetbs9BHBkHRaKyJhAVbBKtWK v23E5L5l7nvO8T9TSyRoGe0efhF7V0g8CS8OQbhFk/Gtixcg3NOXKVUfbaRV3LklcKmw cEG1Ocqb6Ebv1HVX2Ossumu+Evt1ryPXuw2pyzrS+jjHMmHfaP/nvUXHeqlO13xlk0hl OtRy/5z9CzfNUWjEHSrAZTKfVokOqXrfCpCI/TwkgyPiKJGZ0Vb0BduE+PLIHrhChuZl 4OkLQZYdcjw+EOnaoaqsF3YAtVvISN2PJVseCUSXaNeKZDbItek6LxyUuFhfk9eU0gos ICKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=y8yJZyZJiNVVbuKzyGfMGin5zE/uxoHiQcze56MZlR4=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=RYrHTB7owHCtmuB9r/XN8m2L2KMD2GNG1Jkbb5GzGXql/K4sI9a57cfF7TWZg9t3dP bRmWIQNtyAHkmHonLGlLTGvwiObChoJuddoNXmdME5BLNHyjrV381mD/wuLy0vQT9Yr4 SUIW9lVdd2+GtKKcZFgJbWVIhNRVqnagQZw8zho8GOleDnhk8GUlNNtB9g11sMAUpyG2 pDio2aQVT5jeu5ko/dkJO+0isnqdj/MuP5eOfxLU2JiuaJCd/NRWEnQ8r9zvl7FkmrjE cZ0CGwukv7Uzx3ALam9pw7N7LvILypd2KQsIOKp0Fm1lYsVhkQ+vx+1zC3RiIfIH4eE5 uHLw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KZNt0slG; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id w4-20020a05622a190400b0042f30d1fef3si8094428qtc.760.2024.03.12.11.42.16 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 12 Mar 2024 11:42:16 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KZNt0slG; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1rk74E-0000R7-5H; Tue, 12 Mar 2024 14:41:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <richard.henderson@linaro.org>) id 1rk743-0000M3-PY for qemu-devel@nongnu.org; Tue, 12 Mar 2024 14:41:29 -0400 Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <richard.henderson@linaro.org>) id 1rk741-0001Mg-Vg for qemu-devel@nongnu.org; Tue, 12 Mar 2024 14:41:27 -0400 Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-1dd6198c4e2so42112265ad.2 for <qemu-devel@nongnu.org>; Tue, 12 Mar 2024 11:41:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710268885; x=1710873685; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=y8yJZyZJiNVVbuKzyGfMGin5zE/uxoHiQcze56MZlR4=; b=KZNt0slGng7poeIOdYs+yobdIjOy+smH+WzuHHgnax6BF9psn6o5rTjpZk+IoHRlsf ggMpWQlm2+x3PgwgN8Y6Y3jlukd4fFATURSPR91iPiP8ERxmYudOwiQKqapCmtgv9veC M8Wj37THjKcVQGRlqtz8o7JF1aq6tNa7dG8bm9fpmkH/tC9miLHW4cQR6UcHC0pTBtLy kMCe94t2b/YSLdKPbIXvw8sLWQy57OGVvrA/fCrI5ndzxDABOZ+mprP3Htsy+epxyA1I MSCG0kyFQgV0GoStIKSSP0fAwqVuJZDLSQKC6zc3lA6hCeXYAH/aMZGEgblZdPR+kK/G 6Uow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710268885; x=1710873685; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=y8yJZyZJiNVVbuKzyGfMGin5zE/uxoHiQcze56MZlR4=; b=S7AgAvxgukahheNrdbB15KkGXkbE1/F9HVMiOfPF2kj4OpGbpOHDlmlDFZ8LfJC8Rt n+vwWCyalOj+V25Y977QMbfonwugJ/QhnD+c7kU3ZhiRyVRWKlMpL3pI6gV+pf9QeaHX WmWBX3jLW4d+21vC4Fqm7iatwLQ7qPnyQNBQEG9vOxQqSl/Tg/4PlNjPeD8M93g/y9Zr dOp1LZhVAwVFfZV8mtZgv8fxKAUAncPVER1rWuWLyh1i3s6zOGDK1+cffjN8CDFZLGDX OOy955jasrnpMGT+xHy94wLUGrf3Arl7qQs1Q1HVEZuMumBVhrhWhgFmk74AqROB98JU yXBQ== X-Gm-Message-State: AOJu0Yxq+53mh4hh/XjgbMTM46gaWQw/FxOdlDDdrVlWv56Yk4oUJ+Lh r+613E13v4NKT2VfI4y55q46gFVjD8AOz80BpHlyZTAfHyECcbsbntR9rSY5QX3Is2RCVrMRNXz e X-Received: by 2002:a17:902:d583:b0:1dd:72ea:58cd with SMTP id k3-20020a170902d58300b001dd72ea58cdmr16199160plh.3.1710268884703; Tue, 12 Mar 2024 11:41:24 -0700 (PDT) Received: from stoup.. (173-197-098-125.biz.spectrum.com. [173.197.98.125]) by smtp.gmail.com with ESMTPSA id b11-20020a170903228b00b001dca40bb727sm6951739plh.88.2024.03.12.11.41.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 11:41:24 -0700 (PDT) From: Richard Henderson <richard.henderson@linaro.org> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org> Subject: [PULL 5/8] linux-user/elfload: Don't close an unopened file descriptor Date: Tue, 12 Mar 2024 08:41:12 -1000 Message-Id: <20240312184115.365415-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240312184115.365415-1-richard.henderson@linaro.org> References: <20240312184115.365415-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::62f; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org |
Series |
[PULL,1/8] linux-user: Add FIFREEZE and FITHAW ioctls
|
expand
|
diff --git a/linux-user/elfload.c b/linux-user/elfload.c index 4dbca05646..26d4c1d6b3 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -4522,7 +4522,9 @@ static int elf_core_dump(int signr, const CPUArchState *env) ret = -errno; mmap_unlock(); cpu_list_unlock(); - close(fd); + if (fd >= 0) { + close(fd); + } return ret; } #endif /* USE_ELF_CORE_DUMP */