Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp411325ybn; Tue, 1 Oct 2019 23:36:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqwNxATF0jPwrdhHwsEZ9Ig91OiIUNhxSrHAYgOaZ7xMg+E1Isjnsmz9WRyfKcYDKFdOeH3w X-Received: by 2002:a17:906:d797:: with SMTP id pj23mr1699698ejb.70.1569998212021; Tue, 01 Oct 2019 23:36:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569998212; cv=none; d=google.com; s=arc-20160816; b=qitaMDgkkuwfrecYuGKv26Cf3Yanya3Sba25W7BqkpXmu94Tr80cq3bDRWSou0FMhi /e1vBjHZrOSz9suxeRny6S5e7n8LC0SVCR2Pf9yXj/9KpmOYBegrmyE/4wJzxdLtlZHk 35giez4oN6g0asg/uuefBB2je7XekslKO6fk6W0tzFmHdwmt+nVTge1JH0AQD72T+ZkJ S870Eu/8cudDKxRiD/8NS3tyhCdMdmfvA+o2Y/6hTrUK8HK7tg26WKkRJ5hUgCiKwG62 U6rZ2UxKS5pJjrnFWirYdMsYeyja3KmWU5gWu81Cy/BmhJ6twckodsE+Qn2l8dsNbAAl FnMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=q94dRKz4b2ujZyKh9SewW/ndsUtNsYD4cEorXSz3XVw=; b=WTzd53y0tvAJLcYMifuw2Tg8wmDOj/IMckiXOROeg4QaaSs6Y7qo4XVT5WvCTexqLL mrFw2OwavNpB5RcUuUCXdeawOd84FlgwQL+L5Z4neLNHJvWdwv/VE9EF3FBhS7cCkWvK pXWNFGo1TgY1lPSsCZdm+qfj2Zm/92Rzd+nglpjwjEm7tO6J6/Qb6wW/dTuWroHju4uZ hY6GDPwt13vWrNGTBwhzzN/X25OEhGUcFCX0fxBWN3Ss3wd5Icq+3/pjYW7SvEtlJao1 +4rtC6jQW3XND6BRemYD8eftxfNZu7sdusB8JBTpFRK6od8ydOIJNdTmMIEyH1CUJJgi FHig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qFyG9DZQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l12si12168851edk.444.2019.10.01.23.36.27; Tue, 01 Oct 2019 23:36:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qFyG9DZQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729831AbfJBDmp (ORCPT + 99 others); Tue, 1 Oct 2019 23:42:45 -0400 Received: from mail-lf1-f68.google.com ([209.85.167.68]:43040 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729544AbfJBDmo (ORCPT ); Tue, 1 Oct 2019 23:42:44 -0400 Received: by mail-lf1-f68.google.com with SMTP id u3so11556270lfl.10; Tue, 01 Oct 2019 20:42:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=q94dRKz4b2ujZyKh9SewW/ndsUtNsYD4cEorXSz3XVw=; b=qFyG9DZQ7twICwXXtyaC33AGqD2ZcSCuLMQxI8xqX4oec3Qwc3VyjHiGEt8L/DTZJi HiqtYc+86a8ki6XHnCf0TSMpx7IlX3PD1ipdOrtkVSI55L/Y/SR2e/pvewiwbVINhhHa swRyAgh6ISWbnd2LhAK3/kDfPa8HEib9KcR8V2/b0M/1hLIVA3SiwptWp7EkEPczyojB z7vXDINXU9rhOo+NbF2vo82ZkYm84zmyIxQ59zJE3Qbva9aWipwjT8zSTY+R8LYBA5jD i3ijX/Fj/Pv5H0LXiweDAmp+H7HK/Dc3L1H4nTanQk5V2MFRuaZxSHR+Zwwc3thJ3L2b 0sCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=q94dRKz4b2ujZyKh9SewW/ndsUtNsYD4cEorXSz3XVw=; b=e87LEWFIfxeUfS7Q2oD/A/bramwqeUbpta9Pr3iFg4meLFIleCbTGxVIt5KJ45+87Y B6/lS+cPye1TUxkNqh3huebLj5z782qFNvSfqnO1teJ/75GeNlXbkg/sUIwNVuEyZi0q mplCQZrVAZ1rEHN6EvliS9ppOQO84CiqFfmRJDXjZiiGnPqh14eEiWWdhE/6H0R2qnVb 0AmlTxI/t4ZF7+QzBguhD4idNK/wmInraZ2DUkO1KNIFk46zQe2UBTJCCnZQx6BSNGLo i4Y9stF0ljl5/D9wsJyHc6MNi2Ul9Mvma7pYxI9fYWDfCyjJGWEXUjbWMSg2OEUfEPoE T68g== X-Gm-Message-State: APjAAAXSP/JbJZYSD/YWO8uG3EXn3CcuXUqWP0o0v2dqKZXTGfJbj7vg np+fK29uau7sE2MZ9+ck+PI1DjfTwbP8NLVMnQg= X-Received: by 2002:a19:2d19:: with SMTP id k25mr700605lfj.76.1569987762302; Tue, 01 Oct 2019 20:42:42 -0700 (PDT) MIME-Version: 1.0 References: <20191001173728.149786-1-brianvv@google.com> <20191001173728.149786-3-brianvv@google.com> In-Reply-To: From: Brian Vazquez Date: Tue, 1 Oct 2019 20:42:30 -0700 Message-ID: Subject: Re: [PATCH bpf 2/2] selftests/bpf: test_progs: don't leak server_fd in test_sockopt_inherit To: Andrii Nakryiko Cc: Brian Vazquez , Alexei Starovoitov , Daniel Borkmann , "David S . Miller" , Stanislav Fomichev , open list , Networking , bpf Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thanks for reviewing the patches Andrii! Although Daniel fixed them and applied them correctly. On Tue, Oct 1, 2019 at 8:20 PM Andrii Nakryiko wrote: > > On Tue, Oct 1, 2019 at 10:40 AM Brian Vazquez wrote: > > > > I don't think there is a need to add "test_progs:" to subject, " > test_sockopt_inherit" is specific enough ;) > > > server_fd needs to be close if pthread can't be created. > > typo: closed > > > > > Fixes: e3e02e1d9c24 ("selftests/bpf: test_progs: convert test_sockopt_inherit") > > Cc: Stanislav Fomichev > > Signed-off-by: Brian Vazquez > > --- > > Acked-by: Andrii Nakryiko > > > tools/testing/selftests/bpf/prog_tests/sockopt_inherit.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/tools/testing/selftests/bpf/prog_tests/sockopt_inherit.c b/tools/testing/selftests/bpf/prog_tests/sockopt_inherit.c > > index 6cbeea7b4bf16..8547ecbdc61ff 100644 > > --- a/tools/testing/selftests/bpf/prog_tests/sockopt_inherit.c > > +++ b/tools/testing/selftests/bpf/prog_tests/sockopt_inherit.c > > @@ -195,7 +195,7 @@ static void run_test(int cgroup_fd) > > > > if (CHECK_FAIL(pthread_create(&tid, NULL, server_thread, > > (void *)&server_fd))) > > - goto close_bpf_object; > > + goto close_server_fd; > > > > pthread_mutex_lock(&server_started_mtx); > > pthread_cond_wait(&server_started, &server_started_mtx); > > -- > > 2.23.0.444.g18eeb5a265-goog > >