summaryrefslogtreecommitdiff
path: root/kernel/bpf/core.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@fb.com>2014-11-19 05:43:46 +0300
committerJens Axboe <axboe@fb.com>2014-11-19 05:43:46 +0300
commitb3521729769ec71567a2e32a38609f87e781e41b (patch)
tree66a8494968706420c3eb043caa5868702d440d18 /kernel/bpf/core.c
parent139768895309c6c1d6913e909e9c9422f81a1640 (diff)
parentfc14f9c1272f62c3e8d01300f52467c0d9af50f9 (diff)
downloadlinux-b3521729769ec71567a2e32a38609f87e781e41b.tar.xz
Merge branch 'master' into for-3.19/drivers
Diffstat (limited to 'kernel/bpf/core.c')
-rw-r--r--kernel/bpf/core.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/kernel/bpf/core.c b/kernel/bpf/core.c
index f0c30c59b317..d6594e457a25 100644
--- a/kernel/bpf/core.c
+++ b/kernel/bpf/core.c
@@ -655,3 +655,12 @@ void bpf_prog_free(struct bpf_prog *fp)
schedule_work(&aux->work);
}
EXPORT_SYMBOL_GPL(bpf_prog_free);
+
+/* To execute LD_ABS/LD_IND instructions __bpf_prog_run() may call
+ * skb_copy_bits(), so provide a weak definition of it for NET-less config.
+ */
+int __weak skb_copy_bits(const struct sk_buff *skb, int offset, void *to,
+ int len)
+{
+ return -EFAULT;
+}