Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp8619955ybn; Tue, 1 Oct 2019 10:40:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqwVmj7FuKki8mLaczgfHOGU05d1d+3RD7w0l6oPnjoZEh5tdSN3KpJ0o3w2rSoqr2GBNbeG X-Received: by 2002:a17:906:b84e:: with SMTP id ga14mr25119970ejb.215.1569951629451; Tue, 01 Oct 2019 10:40:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569951629; cv=none; d=google.com; s=arc-20160816; b=uhTwwy3HAwrhGmI/hkCkn5f4nlxGUVBHy6HaLJQ5O/77LXqwB8b61WgGJYb09QvqHM 9fC04nvQrYyBICwXnfaPl/5JqRN+TYKS4Fkhb6+k7jCp3bACwHtB90p8QsudjvAHeb9p mmrCv//jI5/iuDG7OYaQIQOR+V8UMjIx05sd/ZLOChJKQPQ+kx3kM7aq/51g3xhmiocR jvzwaz07zszYhVVof1lOR1Zxh77ZxlIIxCYInaQusbF2BOozZquRqd4Bye8mIAHZp4UH +bRpb8W7E13hgm9cA3tqgk+G1zM+pbYPYgV2t5c8AzNXTs75ov2uO7LMxOKuuvJLsbOm cneA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:from:subject:references :mime-version:message-id:in-reply-to:date:dkim-signature; bh=wk/kSRiVr2+hsdRYwtEFf1vJ/Djbn8eKotL+Cap8me8=; b=ORLvj8ZyVUU/Wxqg3MfqALo3go1/nbbgLLehh0uVXLxjsyOPHYGVP2VQElN8NGapr/ HXJw+KSE69OUN+qE0Z5NMFZA9bpXEk1ynrnqQOqro1Z326pwG8/ZNcStJUp422EpXxuH Gn+z6Ni9f9hei0Ikl2SnStUfsA7OfjD9p/mtHBgjSuFAhfS1qqBPN9qXG5vEfjG0WHuo O163eEzRSARuakBkY9rCMsDiwxBliwihA3ABGyXHx/TJ1g5S/TnHvb2pfWrUR3H0DLMq UkKo2qqC52B9d+my8Z8xJ7sibKc/XdfgMpH04O9w5e0TuGQbnmKSOC2pJtP3Lt00PKJ5 7/Xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=R43ESF1q; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id pk19si9026139ejb.257.2019.10.01.10.40.05; Tue, 01 Oct 2019 10:40:29 -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=@google.com header.s=20161025 header.b=R43ESF1q; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731257AbfJARh5 (ORCPT + 99 others); Tue, 1 Oct 2019 13:37:57 -0400 Received: from mail-pg1-f201.google.com ([209.85.215.201]:35680 "EHLO mail-pg1-f201.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731154AbfJARh4 (ORCPT ); Tue, 1 Oct 2019 13:37:56 -0400 Received: by mail-pg1-f201.google.com with SMTP id r35so11669983pgb.2 for ; Tue, 01 Oct 2019 10:37:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=wk/kSRiVr2+hsdRYwtEFf1vJ/Djbn8eKotL+Cap8me8=; b=R43ESF1qMXL4EzulkwPKBST9Dj9BWXUYzOA79YIBN3gl1tGYXc1vwhGctIq6E00cZs 0/UjG2x1/oKDfi/3K/19NhvRkp+8lpVt4QD0EcW517r04E6T7md9G8OFfYeCb54cqRWW hFzCDuhmXbM62ySyLJzRaOr8xImhDdNMYqte9P8E99uDPTcvk6k5/o8SMaET/DQYIhiC XBqvzzqPoNyK4Qj5QBDw8DtSrRxTw1H6QgF/Iotstr3P/bwVSwEGLYWQC1svmAanmuSl Q08tr61T61IwMcGoYYyaD9N3u7i2s7GkmserM6YQ7yqFmj1awCGslVtUNUWbgxD3gDC2 hRhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=wk/kSRiVr2+hsdRYwtEFf1vJ/Djbn8eKotL+Cap8me8=; b=sWDF3sjt/JZgPijyqm/umVDcHOZE3Fbx7EDhZn7OhJvupwTVoDxiisBD/Wvz16DsJ7 pV+riVgz++x9/IRgV6zanlzhZObkrQ0A5ONM7uS0sTCPrVkf6pCj87+E35OIddjjwiMY cTRbWSHm8H2NtfXTTvBV+vgIQ4pzm2cNBw9WyGpPbqNF2m0EQSSpLkc2BQT10ajVxPFb 5q1N5OUeZKTb4RZeK4Rz3QWRsXhJVFLOS6VLo5aiIGr483aik1nSZeVfQB2Zpv00vtwp keivBrS0wH8u8p+JGRs5sExWc3t/c7nhfhCZNPr6oF3UV7layEzSP4uls/FCeunSTGiL ErMw== X-Gm-Message-State: APjAAAXjLimRtliR3nF0syIFm8djfTxtTdLj3IgecrRYJCP29tiKjr1l 4dRLlnj32dQ0gM777nyMIFBAk1RbkdLP X-Received: by 2002:a65:6252:: with SMTP id q18mr32002268pgv.111.1569951475681; Tue, 01 Oct 2019 10:37:55 -0700 (PDT) Date: Tue, 1 Oct 2019 10:37:28 -0700 In-Reply-To: <20191001173728.149786-1-brianvv@google.com> Message-Id: <20191001173728.149786-3-brianvv@google.com> Mime-Version: 1.0 References: <20191001173728.149786-1-brianvv@google.com> X-Mailer: git-send-email 2.23.0.444.g18eeb5a265-goog Subject: [PATCH bpf 2/2] selftests/bpf: test_progs: don't leak server_fd in test_sockopt_inherit From: Brian Vazquez To: Brian Vazquez , Alexei Starovoitov , Daniel Borkmann , "David S . Miller" Cc: Stanislav Fomichev , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org, Brian Vazquez 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 server_fd needs to be close if pthread can't be created. Fixes: e3e02e1d9c24 ("selftests/bpf: test_progs: convert test_sockopt_inherit") Cc: Stanislav Fomichev Signed-off-by: Brian Vazquez --- 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