aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/isdn/i4l/isdn_ppp.c4
-rw-r--r--drivers/net/ppp/ppp_generic.c4
-rw-r--r--drivers/net/team/team_mode_loadbalance.c10
-rw-r--r--include/linux/filter.h2
-rw-r--r--lib/test_bpf.c2
-rw-r--r--net/core/filter.c2
-rw-r--r--net/core/ptp_classifier.c2
-rw-r--r--net/netfilter/xt_bpf.c5
-rw-r--r--net/sched/cls_bpf.c4
9 files changed, 18 insertions, 17 deletions
diff --git a/drivers/isdn/i4l/isdn_ppp.c b/drivers/isdn/i4l/isdn_ppp.c
index a5da511e3c9a..61ac63237446 100644
--- a/drivers/isdn/i4l/isdn_ppp.c
+++ b/drivers/isdn/i4l/isdn_ppp.c
@@ -634,7 +634,7 @@ isdn_ppp_ioctl(int min, struct file *file, unsigned int cmd, unsigned long arg)
634#ifdef CONFIG_IPPP_FILTER 634#ifdef CONFIG_IPPP_FILTER
635 case PPPIOCSPASS: 635 case PPPIOCSPASS:
636 { 636 {
637 struct sock_fprog fprog; 637 struct sock_fprog_kern fprog;
638 struct sock_filter *code; 638 struct sock_filter *code;
639 int err, len = get_filter(argp, &code); 639 int err, len = get_filter(argp, &code);
640 640
@@ -653,7 +653,7 @@ isdn_ppp_ioctl(int min, struct file *file, unsigned int cmd, unsigned long arg)
653 } 653 }
654 case PPPIOCSACTIVE: 654 case PPPIOCSACTIVE:
655 { 655 {
656 struct sock_fprog fprog; 656 struct sock_fprog_kern fprog;
657 struct sock_filter *code; 657 struct sock_filter *code;
658 int err, len = get_filter(argp, &code); 658 int err, len = get_filter(argp, &code);
659 659
diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c
index e3923ebb693f..91d6c1272fcf 100644
--- a/drivers/net/ppp/ppp_generic.c
+++ b/drivers/net/ppp/ppp_generic.c
@@ -757,7 +757,7 @@ static long ppp_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
757 757
758 err = get_filter(argp, &code); 758 err = get_filter(argp, &code);
759 if (err >= 0) { 759 if (err >= 0) {
760 struct sock_fprog fprog = { 760 struct sock_fprog_kern fprog = {
761 .len = err, 761 .len = err,
762 .filter = code, 762 .filter = code,
763 }; 763 };
@@ -778,7 +778,7 @@ static long ppp_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
778 778
779 err = get_filter(argp, &code); 779 err = get_filter(argp, &code);
780 if (err >= 0) { 780 if (err >= 0) {
781 struct sock_fprog fprog = { 781 struct sock_fprog_kern fprog = {
782 .len = err, 782 .len = err,
783 .filter = code, 783 .filter = code,
784 }; 784 };
diff --git a/drivers/net/team/team_mode_loadbalance.c b/drivers/net/team/team_mode_loadbalance.c
index dbde3412ee5e..0a6ee07bf0af 100644
--- a/drivers/net/team/team_mode_loadbalance.c
+++ b/drivers/net/team/team_mode_loadbalance.c
@@ -49,7 +49,7 @@ struct lb_port_mapping {
49struct lb_priv_ex { 49struct lb_priv_ex {
50 struct team *team; 50 struct team *team;
51 struct lb_port_mapping tx_hash_to_port_mapping[LB_TX_HASHTABLE_SIZE]; 51 struct lb_port_mapping tx_hash_to_port_mapping[LB_TX_HASHTABLE_SIZE];
52 struct sock_fprog *orig_fprog; 52 struct sock_fprog_kern *orig_fprog;
53 struct { 53 struct {
54 unsigned int refresh_interval; /* in tenths of second */ 54 unsigned int refresh_interval; /* in tenths of second */
55 struct delayed_work refresh_dw; 55 struct delayed_work refresh_dw;
@@ -241,10 +241,10 @@ static int lb_bpf_func_get(struct team *team, struct team_gsetter_ctx *ctx)
241 return 0; 241 return 0;
242} 242}
243 243
244static int __fprog_create(struct sock_fprog **pfprog, u32 data_len, 244static int __fprog_create(struct sock_fprog_kern **pfprog, u32 data_len,
245 const void *data) 245 const void *data)
246{ 246{
247 struct sock_fprog *fprog; 247 struct sock_fprog_kern *fprog;
248 struct sock_filter *filter = (struct sock_filter *) data; 248 struct sock_filter *filter = (struct sock_filter *) data;
249 249
250 if (data_len % sizeof(struct sock_filter)) 250 if (data_len % sizeof(struct sock_filter))
@@ -262,7 +262,7 @@ static int __fprog_create(struct sock_fprog **pfprog, u32 data_len,
262 return 0; 262 return 0;
263} 263}
264 264
265static void __fprog_destroy(struct sock_fprog *fprog) 265static void __fprog_destroy(struct sock_fprog_kern *fprog)
266{ 266{
267 kfree(fprog->filter); 267 kfree(fprog->filter);
268 kfree(fprog); 268 kfree(fprog);
@@ -273,7 +273,7 @@ static int lb_bpf_func_set(struct team *team, struct team_gsetter_ctx *ctx)
273 struct lb_priv *lb_priv = get_lb_priv(team); 273 struct lb_priv *lb_priv = get_lb_priv(team);
274 struct sk_filter *fp = NULL; 274 struct sk_filter *fp = NULL;
275 struct sk_filter *orig_fp; 275 struct sk_filter *orig_fp;
276 struct sock_fprog *fprog = NULL; 276 struct sock_fprog_kern *fprog = NULL;
277 int err; 277 int err;
278 278
279 if (ctx->data.bin_val.len) { 279 if (ctx->data.bin_val.len) {
diff --git a/include/linux/filter.h b/include/linux/filter.h
index 2b0056afd1f7..625f4de9bdf2 100644
--- a/include/linux/filter.h
+++ b/include/linux/filter.h
@@ -188,7 +188,7 @@ int sk_convert_filter(struct sock_filter *prog, int len,
188 struct sock_filter_int *new_prog, int *new_len); 188 struct sock_filter_int *new_prog, int *new_len);
189 189
190int sk_unattached_filter_create(struct sk_filter **pfp, 190int sk_unattached_filter_create(struct sk_filter **pfp,
191 struct sock_fprog *fprog); 191 struct sock_fprog_kern *fprog);
192void sk_unattached_filter_destroy(struct sk_filter *fp); 192void sk_unattached_filter_destroy(struct sk_filter *fp);
193 193
194int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk); 194int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk);
diff --git a/lib/test_bpf.c b/lib/test_bpf.c
index 3d80adbdb559..e03991ea8cc2 100644
--- a/lib/test_bpf.c
+++ b/lib/test_bpf.c
@@ -1472,7 +1472,7 @@ static int run_one(struct sk_filter *fp, struct bpf_test *t)
1472static __init int test_bpf(void) 1472static __init int test_bpf(void)
1473{ 1473{
1474 struct sk_filter *fp, *fp_ext = NULL; 1474 struct sk_filter *fp, *fp_ext = NULL;
1475 struct sock_fprog fprog; 1475 struct sock_fprog_kern fprog;
1476 int err, i, err_cnt = 0; 1476 int err, i, err_cnt = 0;
1477 1477
1478 for (i = 0; i < ARRAY_SIZE(tests); i++) { 1478 for (i = 0; i < ARRAY_SIZE(tests); i++) {
diff --git a/net/core/filter.c b/net/core/filter.c
index b3b0889fe089..2c2d35d9d101 100644
--- a/net/core/filter.c
+++ b/net/core/filter.c
@@ -1585,7 +1585,7 @@ static struct sk_filter *__sk_prepare_filter(struct sk_filter *fp,
1585 * a negative errno code is returned. On success the return is zero. 1585 * a negative errno code is returned. On success the return is zero.
1586 */ 1586 */
1587int sk_unattached_filter_create(struct sk_filter **pfp, 1587int sk_unattached_filter_create(struct sk_filter **pfp,
1588 struct sock_fprog *fprog) 1588 struct sock_fprog_kern *fprog)
1589{ 1589{
1590 unsigned int fsize = sk_filter_proglen(fprog); 1590 unsigned int fsize = sk_filter_proglen(fprog);
1591 struct sk_filter *fp; 1591 struct sk_filter *fp;
diff --git a/net/core/ptp_classifier.c b/net/core/ptp_classifier.c
index 37d86157b76e..d3027a73fd4b 100644
--- a/net/core/ptp_classifier.c
+++ b/net/core/ptp_classifier.c
@@ -133,7 +133,7 @@ void __init ptp_classifier_init(void)
133 { 0x16, 0, 0, 0x00000000 }, 133 { 0x16, 0, 0, 0x00000000 },
134 { 0x06, 0, 0, 0x00000000 }, 134 { 0x06, 0, 0, 0x00000000 },
135 }; 135 };
136 struct sock_fprog ptp_prog = { 136 struct sock_fprog_kern ptp_prog = {
137 .len = ARRAY_SIZE(ptp_filter), .filter = ptp_filter, 137 .len = ARRAY_SIZE(ptp_filter), .filter = ptp_filter,
138 }; 138 };
139 139
diff --git a/net/netfilter/xt_bpf.c b/net/netfilter/xt_bpf.c
index 12d4da8e6c77..bbffdbdaf603 100644
--- a/net/netfilter/xt_bpf.c
+++ b/net/netfilter/xt_bpf.c
@@ -23,10 +23,11 @@ MODULE_ALIAS("ip6t_bpf");
23static int bpf_mt_check(const struct xt_mtchk_param *par) 23static int bpf_mt_check(const struct xt_mtchk_param *par)
24{ 24{
25 struct xt_bpf_info *info = par->matchinfo; 25 struct xt_bpf_info *info = par->matchinfo;
26 struct sock_fprog program; 26 struct sock_fprog_kern program;
27 27
28 program.len = info->bpf_program_num_elem; 28 program.len = info->bpf_program_num_elem;
29 program.filter = (struct sock_filter __user *) info->bpf_program; 29 program.filter = info->bpf_program;
30
30 if (sk_unattached_filter_create(&info->filter, &program)) { 31 if (sk_unattached_filter_create(&info->filter, &program)) {
31 pr_info("bpf: check failed: parse error\n"); 32 pr_info("bpf: check failed: parse error\n");
32 return -EINVAL; 33 return -EINVAL;
diff --git a/net/sched/cls_bpf.c b/net/sched/cls_bpf.c
index 16186965af97..13f64df2c710 100644
--- a/net/sched/cls_bpf.c
+++ b/net/sched/cls_bpf.c
@@ -160,7 +160,7 @@ static int cls_bpf_modify_existing(struct net *net, struct tcf_proto *tp,
160{ 160{
161 struct sock_filter *bpf_ops, *bpf_old; 161 struct sock_filter *bpf_ops, *bpf_old;
162 struct tcf_exts exts; 162 struct tcf_exts exts;
163 struct sock_fprog tmp; 163 struct sock_fprog_kern tmp;
164 struct sk_filter *fp, *fp_old; 164 struct sk_filter *fp, *fp_old;
165 u16 bpf_size, bpf_len; 165 u16 bpf_size, bpf_len;
166 u32 classid; 166 u32 classid;
@@ -191,7 +191,7 @@ static int cls_bpf_modify_existing(struct net *net, struct tcf_proto *tp,
191 memcpy(bpf_ops, nla_data(tb[TCA_BPF_OPS]), bpf_size); 191 memcpy(bpf_ops, nla_data(tb[TCA_BPF_OPS]), bpf_size);
192 192
193 tmp.len = bpf_len; 193 tmp.len = bpf_len;
194 tmp.filter = (struct sock_filter __user *) bpf_ops; 194 tmp.filter = bpf_ops;
195 195
196 ret = sk_unattached_filter_create(&fp, &tmp); 196 ret = sk_unattached_filter_create(&fp, &tmp);
197 if (ret) 197 if (ret)