Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1423154AbbD2Nh7 (ORCPT ); Wed, 29 Apr 2015 09:37:59 -0400 Received: from smtp3-g21.free.fr ([212.27.42.3]:36778 "EHLO smtp3-g21.free.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1423043AbbD2Nh4 (ORCPT ); Wed, 29 Apr 2015 09:37:56 -0400 From: Nicolas Schichan To: "David S. Miller" , Alexei Starovoitov , Daniel Borkmann , linux-kernel@vger.kernel.org, netdev@vger.kernel.org Cc: Nicolas Schichan Subject: [PATCH 1/4] net: filter: make bpf_migrate_filter available outside of net/core/filter.c Date: Wed, 29 Apr 2015 15:37:34 +0200 Message-Id: <1430314657-2552-2-git-send-email-nschichan@freebox.fr> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1430314657-2552-1-git-send-email-nschichan@freebox.fr> References: <1430314657-2552-1-git-send-email-nschichan@freebox.fr> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1424 Lines: 41 This is in preparation of its use in the seccomp code. Signed-off-by: Nicolas Schichan --- include/linux/filter.h | 1 + net/core/filter.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/linux/filter.h b/include/linux/filter.h index caac208..7e0811b 100644 --- a/include/linux/filter.h +++ b/include/linux/filter.h @@ -379,6 +379,7 @@ static inline void bpf_prog_unlock_free(struct bpf_prog *fp) int bpf_prog_create(struct bpf_prog **pfp, struct sock_fprog_kern *fprog); void bpf_prog_destroy(struct bpf_prog *fp); +struct bpf_prog *bpf_migrate_filter(struct bpf_prog *fp); int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk); int sk_attach_bpf(u32 ufd, struct sock *sk); diff --git a/net/core/filter.c b/net/core/filter.c index f6bdc2b..b8ce66e 100644 --- a/net/core/filter.c +++ b/net/core/filter.c @@ -876,7 +876,7 @@ bool sk_filter_charge(struct sock *sk, struct sk_filter *fp) return false; } -static struct bpf_prog *bpf_migrate_filter(struct bpf_prog *fp) +struct bpf_prog *bpf_migrate_filter(struct bpf_prog *fp) { struct sock_filter *old_prog; struct bpf_prog *old_fp; -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/