bpf: check that BPF programs run with preemption disabled
[linux-2.6-block.git] / include / linux / filter.h
index 95e2d7ebdf213ba9043283d44dedc8b4caa9c473..f32b3eca5a0465e0dd4fbc1f0cd4728891d0d312 100644 (file)
@@ -533,7 +533,7 @@ struct sk_filter {
        struct bpf_prog *prog;
 };
 
-#define BPF_PROG_RUN(filter, ctx)  (*(filter)->bpf_func)(ctx, (filter)->insnsi)
+#define BPF_PROG_RUN(filter, ctx)  ({ cant_sleep(); (*(filter)->bpf_func)(ctx, (filter)->insnsi); })
 
 #define BPF_SKB_CB_LEN QDISC_CB_PRIV_LEN