Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp410111ybn; Tue, 1 Oct 2019 23:35:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqx6S6UKXDCgsrP03BZbfu2SELahGHrxmePASPERxXWO7u8x4uZOXXbaXyBdmciUlvTkC6vj X-Received: by 2002:a17:906:fac5:: with SMTP id lu5mr1654010ejb.71.1569998124778; Tue, 01 Oct 2019 23:35:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569998124; cv=none; d=google.com; s=arc-20160816; b=OPW7762kE7ShE99muT/5GXtOle0PXuMkf2rU4/lzplA4HXVnOqWC/7xPHCzQqxNtw0 j9Duas9yT/AR/KTBs2xwwSUHqV+Wz9pQ1TfYUV7VEYTSmWKmsZ5rhIrlbp5EWaMtu7Hg cCzWGf+69BNPxOmgDiuDoLjBUFoz2LODP+gIAg4fPdXpFwfr0KdbeRBjjCUYDsLT5Mf7 VlsdAa24dfczjZQUPb9RGErHatZOMuH7741998U038JLbfU5mIaY22vKEPT2+7KSoeYq 1E8Kla2mdPXE0a3QsLbkGQrSirvcTTXBxzyw+khqUdtbLZ5bKYcwVW0y9TyTmpzxB1fP rgrg== 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=3efpfs9sL1/jMPSW+62FKUauwr4+fAsqJKtdAl4Znuk=; b=uyRLtgeW17FwZPbpsIDZxvpUTBzvsv3t/XCiy0RyCJHRg8+72mIoAxU7zyhDvae3Mc m6A3s2vkb15oQz6cXMO2Yg7xjo3t1wqnhnPrrOT63KtWWITbPFWYThbczugxFB35BOD4 vgabYSA6CHaFD80TXKQvGNQTH2sRNQ+5VKpav42YvJi0gOGQp3y1AVygsjkr1wEm2/sc lMkYekXBPWACT0ZC2XGt+JQMnJg5pdM6HLu++Lb8VSg+bLuB5r8JP1uMIigJfBr75q0d kWy2rzVFnw+NbGI+MJfzzs9vETf2MIfkpORZ68P8WzNqy5Mr+79BQhoviGKVcfhAHL06 PZZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=OOnxpEhN; 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 h14si12693319edk.315.2019.10.01.23.35.00; Tue, 01 Oct 2019 23:35:24 -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=OOnxpEhN; 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 S1729415AbfJBDUU (ORCPT + 99 others); Tue, 1 Oct 2019 23:20:20 -0400 Received: from mail-qt1-f196.google.com ([209.85.160.196]:35427 "EHLO mail-qt1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726869AbfJBDUU (ORCPT ); Tue, 1 Oct 2019 23:20:20 -0400 Received: by mail-qt1-f196.google.com with SMTP id m15so24572872qtq.2; Tue, 01 Oct 2019 20:20:19 -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=3efpfs9sL1/jMPSW+62FKUauwr4+fAsqJKtdAl4Znuk=; b=OOnxpEhNAewa4hDSxdaIuGOMrRwwISKvSnNw/D/bO+aQn5BWbAQxtzznvLW9Eh9pup N3RNjc2mcJmzCojIF1aMtWZwkkUg+TCdNBrsXzGDaYgQAAP9alE6JaFWTg1LV2y7iSLm euecTyJrb68l8FGWN0TsCQMRbtnJ1SEEUdiprZ/0y7UwC1sUekqGEEskFRwvtEEd6a3s e83Hc/AEK9KPRpvqaYi+QVZEHWW0Rx2h3Ji6ZO+LKGLx4bVXYyhil0jGdzKQnQpmYx67 NwJImDtWql4ihaitq+RfoQSjgNOT1j+c/V3xfxDNiv7WLi+1Qm0qlrIScGSN9k5bfX29 2iaQ== 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=3efpfs9sL1/jMPSW+62FKUauwr4+fAsqJKtdAl4Znuk=; b=Y0OwNSJSy+rxcXOeTiExsTPljI2/PMpeq6RUlyl++lUY6j8/ZQsbBbnWh5aGE5CYiM prQuEyBsWgK4bvxdxoRqLLRWJXR8YofCWDeo5Y5bOjZv/M16HCmF4HVzcru/e8EjfzOv 0Z4PQjgMl5sfgHwY+HaXnIcgoIDN/qf4IT34/Q3SCCzcO2Xf3UkFXD9Y/FLTo8080Z7t Usr4NUzlyvbPiaF1Xogf9bJMoI0lUApBszJB861+uXa2bG9j/DfH5Q0V9VaFakxMgmHp HJRzcdjuLWdQSr6w2Cl1JyASWEJk8lSmzahbbx0WZAnv1f0HHYOlfJZlKfmcElB4S3S9 3u7w== X-Gm-Message-State: APjAAAWADIzxr7hcAB/QnhnwP1NAOa8Mu9IEU2fu0ZM5kJ0h3/bFTLyz V6wFc6V1KHJlZ3VPKzjgQlOK6rXN8HKrubAZ4PY= X-Received: by 2002:ac8:5147:: with SMTP id h7mr1862596qtn.117.1569986418840; Tue, 01 Oct 2019 20:20:18 -0700 (PDT) MIME-Version: 1.0 References: <20191001173728.149786-1-brianvv@google.com> <20191001173728.149786-3-brianvv@google.com> In-Reply-To: <20191001173728.149786-3-brianvv@google.com> From: Andrii Nakryiko Date: Tue, 1 Oct 2019 20:20:07 -0700 Message-ID: Subject: Re: [PATCH bpf 2/2] selftests/bpf: test_progs: don't leak server_fd in test_sockopt_inherit To: Brian Vazquez 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 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 >