Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp4683212imm; Tue, 7 Aug 2018 05:48:13 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfE5gL0eBeVQlA1Emo1eQH+kvE93EW38KcYtKkEVKlXxJjSZ5b+RUreOXrT8kTTdos17avC X-Received: by 2002:a17:902:6b4c:: with SMTP id g12-v6mr17421191plt.159.1533646093103; Tue, 07 Aug 2018 05:48:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533646093; cv=none; d=google.com; s=arc-20160816; b=kx2UeuTI7t1oNA2kK1nr3WpQV4Ucd7tmIMh72QdQQ4yKEvS6d4AfZGDrfnYV2V22ih 290f00aya9Y1M5J8Us3nUMSQkE84NrFb2OfciffzBXuMa8R1vKq5Ep4l/6OMBZk7HPJk cZMW9unZY2GsqZwSyWAhAEB/YKp1q3uoTWAZ9LUVrr3HTxYcivSXPFz6q79w3x/DeMl6 7cvttPEt4epx8Kg1Q++1n7UJ+gvAhkiEJdmqmMqKnRd+yq0opVO3N/QFLRikdJKfmXvf 9KBQgz3YxGY3YVY2yWrIwmc0d7lOjY3nmKGqlEHfVLJACCEXUxUtkDJLLNTfrHtk/VLh g7jQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=qB+WNFg4GPPacrJSBKKiZk7VFA5yDHI5rBlmpMuRT4w=; b=Cjhid+w1cLVpb9VkMqCh4xsfX+ShpHWt7ds8v7aUdbvas1yRqbMC2h2hls5mgGiaHV jsWpspGGTvjeIQJhfIF3hCi9gwjBGStjweKFn1Yb9n5xV4lh+G9p79ebdp62R8BAxn2k uaZxSSXJR4exwyPB1IPdXR5yRfB9aClQo4ypF7Yg4KhaaO89Cm4IpDpu70B5daPe8Nb+ KbJuGkXnAOkAW+vVlB0eIJHR+OJMwl5I9z7En/+7mMjn3Mn5dKkVH2/OJDgFeP4TwJXp mU5CsG5/7twKX7upH4XqAyawXSLNjAtHqmseURf2hahlxSCABPtUZ/3JyDiITCNacENm 8PeA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f5-v6si1129998pln.414.2018.08.07.05.47.58; Tue, 07 Aug 2018 05:48:13 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389158AbeHGOpa (ORCPT + 99 others); Tue, 7 Aug 2018 10:45:30 -0400 Received: from www62.your-server.de ([213.133.104.62]:52932 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388793AbeHGOp3 (ORCPT ); Tue, 7 Aug 2018 10:45:29 -0400 Received: from [78.46.172.2] (helo=sslproxy05.your-server.de) by www62.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.85_2) (envelope-from ) id 1fn18z-0000KT-9H; Tue, 07 Aug 2018 14:31:21 +0200 Received: from [62.203.87.61] (helo=linux.home) by sslproxy05.your-server.de with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1fn18z-000X7S-52; Tue, 07 Aug 2018 14:31:21 +0200 Subject: Re: [PATCH bpf-next] bpf: introduce update_effective_progs() To: Roman Gushchin , netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org, kernel-team@fb.com, Alexei Starovoitov References: <20180806212728.8514-1-guro@fb.com> From: Daniel Borkmann Message-ID: Date: Tue, 7 Aug 2018 14:31:20 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <20180806212728.8514-1-guro@fb.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Authenticated-Sender: daniel@iogearbox.net X-Virus-Scanned: Clear (ClamAV 0.100.0/24820/Tue Aug 7 10:44:14 2018) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/06/2018 11:27 PM, Roman Gushchin wrote: > __cgroup_bpf_attach() and __cgroup_bpf_detach() functions have > a good amount of duplicated code, which is possible to eliminate > by introducing the update_effective_progs() helper function. > > The update_effective_progs() calls compute_effective_progs() > and then in case of success it calls activate_effective_progs() > for each descendant cgroup. In case of failure (OOM), it releases > allocated prog arrays and return the error code. > > Signed-off-by: Roman Gushchin > Cc: Alexei Starovoitov > Cc: Daniel Borkmann > Acked-by: Song Liu Applied to bpf-next, thanks Roman!