Message ID | 20220527044700.3666830-5-dominique.martinet@atmark-techno.com |
---|---|
State | Accepted |
Headers | show
Return-Path: <swupdate+bncBCWIVBV7SUGRBU5PYGKAMGQERSUCQHA@googlegroups.com> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20210112 header.b=pRv073Y3; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2607:f8b0:4864:20::1138; helo=mail-yw1-x1138.google.com; envelope-from=swupdate+bncbcwivbv7sugrbu5pygkamgqersucqha@googlegroups.com; receiver=<UNKNOWN>) Received: from mail-yw1-x1138.google.com (mail-yw1-x1138.google.com [IPv6:2607:f8b0:4864:20::1138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4L8XN921Whz9sG5 for <incoming@patchwork.ozlabs.org>; Fri, 27 May 2022 14:47:20 +1000 (AEST) Received: by mail-yw1-x1138.google.com with SMTP id 00721157ae682-3031c87a192sf27544357b3.6 for <incoming@patchwork.ozlabs.org>; Thu, 26 May 2022 21:47:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1653626836; cv=pass; d=google.com; s=arc-20160816; b=SC2UD+mWiw1ob3MfZrsXJ5fH7T62QhcRJeFdks8Bf/yi8aaMpbybAYcExTWPH+Y5PJ Ap4OvjFCUWIE6yrFocmW8f+Os88f5Us/nytnAtaC9/bWxU1xf9g4E3lfSqtATn0EF3H8 rbMhaqHN79dhifSVJR6moxsPieL59tZ6fFLNzxEzdGeDTOMDlsyD1setd4V/D6/pLbx2 Tee97DmR/VQFwk5TZzVV1RAfevGTYeLm1ikTcJVZM6iV06mcieMkh9D891o7CV+mS/QE HUZ++KT6ggHjvQFd+f50fDX8qD/RXRGv6xfZIalR+79HZ3sG21QWs78EhObLGcwIBUSP q0RQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=sWIXDyLn02ukTtxRJxf9fzxX/M1bOeuZNJRlUIY4ULE=; b=snC23SYVVMx7nMqk95LBeM6/TCq2Lh5AURg4/gjVuLOv6pfcDRUgeBQWUEMOQ1lX2+ GO38Fx6fDz+eZ57c+16duEUacb8uqRcpDYtgsTTM94kYdzKbCejiFoQkj6CyoSR1v7tG pt7MgKeqH+AaU3LSC+y/SNzkq3XFngs5Yp6NDml9FoBsLVrupCyUWtyWFGOV8vwNfj6r 8x/QUpt/mjFk7EFbhSMakNL+wMMQGlh+bWpT/DprvAWlxK/bUHaCQYhKyEpCAeR1Y7+3 jD6w+msGUMK+GBovjMWOukK6kUVYzItQBTcP1SAX5hTzYzb/s9CmCo31Vw/fJXghHRU5 MYNA== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of dominique.martinet@atmark-techno.com designates 35.74.137.57 as permitted sender) smtp.mailfrom=dominique.martinet@atmark-techno.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=sWIXDyLn02ukTtxRJxf9fzxX/M1bOeuZNJRlUIY4ULE=; b=pRv073Y3AIVRU5KqZCkqXFm+4KveGErwxADn1hpDXvtfo+pPEUBFg6jI9h77a5Xa7y hBTgoS7KRuQv6yubWBd3hTlplG+Qjh/K8LjpFjm6F5Bp5hneoKwnK54d/soSjlzcQv3G 0NGaCD702d+3P+xoZIpiobyrGEu/QCQpeHfB/ioUYK3szfLA/m5ZZdxf1PC2Kpfs91FT z1FpuCWe5L4LvHZ7MZVLItIKUZcVITXB4w7hRn46uAxBkanE5htmHp6gJgBeKfl0+XPV Av/cS2SN3h2hKATw3mkCZFDp+1Qhg7hLaZiX06Sz9dnlEMaQb+sU/KQQ2xdcreme7KDd FwOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=sWIXDyLn02ukTtxRJxf9fzxX/M1bOeuZNJRlUIY4ULE=; b=Q5Q5AztVi+55PZ4xfEan4sFHYe9JXWDWwMKk1eQl2bps7p2y1NOV/K5yX9raVhEuzQ /A/MvkX/3pqFRM0paAtybhw0kadkPZhL0KhqJD36PVbQTTE6iDXopk/Ja4m4JEu8FdPV cQUCetlB+kcPdWmk8qq2T8gcFGkOoCQ43ApFJ45Npou7trm2JviC+K/RE9r51bOzEIDo 5hQMCwvS9A1+SdQJdZKN+hfojT1KCjtkGLtpggycnmhu+2kQf+HFVF/l+msshdr6QuRD V339Ww4P61WRPt2xcR+fLKxpGj+ZuykgKtu1A9qkIscwqX2bd1Ncsy9s1PaySjvRHbBr T5yw== Sender: swupdate@googlegroups.com X-Gm-Message-State: AOAM530svg3XEX5qM3QloeVNfNTAH+KbBW79yI2hlMzM9nDCvW8kEmoU 0pyVLRCP2p300C61ScChqrA= X-Google-Smtp-Source: ABdhPJxYePMKcSNYczEqoqmbk3UpdK3FhjL14o7bRZPZN8Ll6xZnv7xUTrjQmKcWwFFlvfAdNTz3IQ== X-Received: by 2002:a05:6902:1248:b0:657:14d3:6eca with SMTP id t8-20020a056902124800b0065714d36ecamr5797615ybu.583.1653626836091; Thu, 26 May 2022 21:47:16 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a25:e6cf:0:b0:64f:594a:592f with SMTP id d198-20020a25e6cf000000b0064f594a592fls13150864ybh.5.gmail; Thu, 26 May 2022 21:47:15 -0700 (PDT) X-Received: by 2002:a25:344f:0:b0:64e:6f79:914 with SMTP id b76-20020a25344f000000b0064e6f790914mr38512942yba.313.1653626835482; Thu, 26 May 2022 21:47:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653626835; cv=none; d=google.com; s=arc-20160816; b=UmiR1Q/3ZuS+iwicArmAGBH5MwORzI4qS5zgAPCbvQnt2XbOjZ0wgDpajhF3jKgqww QuXTNx0vuO5Ub3nMcPGe/n3nUWpEp1xK5w6B9DiSqXH7tVWTrdT5gwvxz7K3Fr+mvwdX ucNNGVRGAv+RcoPXEr1BbJ2Coy0HqtMi5GOI7r8XDTZ0GJm+6/2D5MmKUL4XRuTGFGQa WT0B8PQ0/rLzvvkKRyn+FxqwSfz2DMN2jcbQPlhqsgyBKxshmp8EwgSfuT5AvWP9nqO/ WD+xgj/+oF2xtEZkt1B/XyD2hibCZ2BCJbDWFCe2V/HVJhSRWpNNCUejyAXfXeuMA+Vq Yylw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=hGJKQWhug3i9HF5kDLfCNywGJiYFBc19z5jVCY7b1aA=; b=GbJbmP+4iY5/mD25nEFiE9RPmVcLGlIGCJ4qMC+JbqNlDfKGC2dmbNMGVMDkdOQAXJ /gy2D09sMgNgmrnP/efReAZsznQR0xqTPBnLJSsRM9ljVfUgoxHeZZENyb3ZArFfBCN9 MJs7MoWIgxjLYvVaqCPFDe4X6hfzJWxVGO3HkppbZVqyD/nb9OYnqYGxDUf5WL5bKii6 zthr5kOziaTZaTX06NI3iVqo1QHeyC3OWApA34nhvD6cgZxQZXImC04aqepwp0g7Z/MA PI978yRqR9YELuHHkZq+i57ZJ9hBhrxbgt7Cta49fxEDRyMP2X74nWwmfmy16yzRiOc3 uVOQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of dominique.martinet@atmark-techno.com designates 35.74.137.57 as permitted sender) smtp.mailfrom=dominique.martinet@atmark-techno.com Received: from gw2.atmark-techno.com (gw2.atmark-techno.com. [35.74.137.57]) by gmr-mx.google.com with ESMTP id y207-20020a814bd8000000b003002932069csi103232ywa.3.2022.05.26.21.47.14 for <swupdate@googlegroups.com>; Thu, 26 May 2022 21:47:15 -0700 (PDT) Received-SPF: pass (google.com: domain of dominique.martinet@atmark-techno.com designates 35.74.137.57 as permitted sender) client-ip=35.74.137.57; Received: from gw2.atmark-techno.com (localhost [127.0.0.1]) by gw2.atmark-techno.com (Postfix) with ESMTP id 4F4F820D6C for <swupdate@googlegroups.com>; Fri, 27 May 2022 13:47:13 +0900 (JST) Received: from mail-pj1-f69.google.com (mail-pj1-f69.google.com [209.85.216.69]) by gw2.atmark-techno.com (Postfix) with ESMTPS id 0A15D20D68 for <swupdate@googlegroups.com>; Fri, 27 May 2022 13:47:13 +0900 (JST) Received: by mail-pj1-f69.google.com with SMTP id i4-20020a17090a718400b001e09f0af976so2122112pjk.9 for <swupdate@googlegroups.com>; Thu, 26 May 2022 21:47:12 -0700 (PDT) X-Received: by 2002:a17:902:9044:b0:15d:1c51:5bef with SMTP id w4-20020a170902904400b0015d1c515befmr41028157plz.170.1653626832100; Thu, 26 May 2022 21:47:12 -0700 (PDT) X-Received: by 2002:a17:902:9044:b0:15d:1c51:5bef with SMTP id w4-20020a170902904400b0015d1c515befmr41028142plz.170.1653626831826; Thu, 26 May 2022 21:47:11 -0700 (PDT) Received: from pc-0115 (35.112.198.104.bc.googleusercontent.com. [104.198.112.35]) by smtp.gmail.com with ESMTPSA id f13-20020aa782cd000000b0051887e34143sm2365201pfn.129.2022.05.26.21.47.11 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 May 2022 21:47:11 -0700 (PDT) Received: from martinet by pc-0115 with local (Exim 4.95) (envelope-from <martinet@pc-0115>) id 1nuRsU-00FNw1-Bb; Fri, 27 May 2022 13:47:10 +0900 From: Dominique Martinet <dominique.martinet@atmark-techno.com> To: swupdate@googlegroups.com, sbabic@denx.de Cc: Dominique Martinet <dominique.martinet@atmark-techno.com> Subject: [swupdate] [PATCH 4/6] progress_thread: set progress bar connection fd as CLOEXEC Date: Fri, 27 May 2022 13:46:58 +0900 Message-Id: <20220527044700.3666830-5-dominique.martinet@atmark-techno.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220527044700.3666830-1-dominique.martinet@atmark-techno.com> References: <20220527044700.3666830-1-dominique.martinet@atmark-techno.com> MIME-Version: 1.0 X-Original-Sender: dominique.martinet@atmark-techno.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of dominique.martinet@atmark-techno.com designates 35.74.137.57 as permitted sender) smtp.mailfrom=dominique.martinet@atmark-techno.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: <swupdate.googlegroups.com> X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: <https://groups.google.com/group/swupdate/post>, <mailto:swupdate@googlegroups.com> List-Help: <https://groups.google.com/support/>, <mailto:swupdate+help@googlegroups.com> List-Archive: <https://groups.google.com/group/swupdate List-Subscribe: <https://groups.google.com/group/swupdate/subscribe>, <mailto:swupdate+subscribe@googlegroups.com> List-Unsubscribe: <mailto:googlegroups-manage+605343134186+unsubscribe@googlegroups.com>, <https://groups.google.com/group/swupdate/subscribe> |
Series |
Avoid leaking fd to child processes: use CLOEXEC
|
expand
|
On 27.05.22 06:46, Dominique Martinet wrote: > Signed-off-by: Dominique Martinet <dominique.martinet@atmark-techno.com> > --- > core/progress_thread.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/core/progress_thread.c b/core/progress_thread.c > index 5a3dc5ac6713..351644ca49d6 100644 > --- a/core/progress_thread.c > +++ b/core/progress_thread.c > @@ -271,6 +271,9 @@ void *progress_bar_thread (void __attribute__ ((__unused__)) *data) > } > } > > + if (fcntl(connfd, F_SETFD, FD_CLOEXEC) < 0) > + WARN("Could not set %d as cloexec: %s", connfd, strerror(errno)); > + > /* > * Save the new connection to be handled by the progress thread > */ Reviewed-by: Stefano Babic <sbabic@denx.de> Best regards, Stefano Babic
diff --git a/core/progress_thread.c b/core/progress_thread.c index 5a3dc5ac6713..351644ca49d6 100644 --- a/core/progress_thread.c +++ b/core/progress_thread.c @@ -271,6 +271,9 @@ void *progress_bar_thread (void __attribute__ ((__unused__)) *data) } } + if (fcntl(connfd, F_SETFD, FD_CLOEXEC) < 0) + WARN("Could not set %d as cloexec: %s", connfd, strerror(errno)); + /* * Save the new connection to be handled by the progress thread */
Signed-off-by: Dominique Martinet <dominique.martinet@atmark-techno.com> --- core/progress_thread.c | 3 +++ 1 file changed, 3 insertions(+)