Home Home > GIT Browse > stable
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2019-05-17 06:38:43 +0200
committerJiri Slaby <jslaby@suse.cz>2019-05-17 06:38:51 +0200
commit09f4f2ee12d3c0424897d19fdcd5773be82f69b1 (patch)
tree3b328098a5cd297dc29349c81b64172c696971b9
parent44928b1d686bbcfb1f654eaf8fc514e004eb060e (diff)
flow_dissector: disable preemption around BPF calls
-rw-r--r--net/core/flow_dissector.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c
index 94a450b2191a..139470d8d3c0 100644
--- a/net/core/flow_dissector.c
+++ b/net/core/flow_dissector.c
@@ -712,7 +712,10 @@ bool __skb_flow_bpf_dissect(struct bpf_prog *prog,
flow_keys->thoff = flow_keys->nhoff;
bpf_compute_data_pointers((struct sk_buff *)skb);
+
+ preempt_disable();
result = BPF_PROG_RUN(prog, skb);
+ preempt_enable();
/* Restore state */
memcpy(cb, &cb_saved, sizeof(cb_saved));