summaryrefslogtreecommitdiffstats
path: root/debian/patches-rt/0011-lwt-Don-t-disable-migration-prio-invoking-BPF.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches-rt/0011-lwt-Don-t-disable-migration-prio-invoking-BPF.patch')
-rw-r--r--debian/patches-rt/0011-lwt-Don-t-disable-migration-prio-invoking-BPF.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/debian/patches-rt/0011-lwt-Don-t-disable-migration-prio-invoking-BPF.patch b/debian/patches-rt/0011-lwt-Don-t-disable-migration-prio-invoking-BPF.patch
new file mode 100644
index 0000000000..93c21b4511
--- /dev/null
+++ b/debian/patches-rt/0011-lwt-Don-t-disable-migration-prio-invoking-BPF.patch
@@ -0,0 +1,40 @@
+From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Date: Thu, 26 Oct 2023 09:12:06 +0200
+Subject: [PATCH 11/15] lwt: Don't disable migration prio invoking BPF.
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.10/older/patches-6.10.2-rt14.tar.xz
+
+There is no need to explicitly disable migration if bottom halves are
+also disabled. Disabling BH implies disabling migration.
+
+Remove migrate_disable() and rely solely on disabling BH to remain on
+the same CPU.
+
+Cc: bpf@vger.kernel.org
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+---
+ net/core/lwt_bpf.c | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+--- a/net/core/lwt_bpf.c
++++ b/net/core/lwt_bpf.c
+@@ -40,10 +40,9 @@ static int run_lwt_bpf(struct sk_buff *s
+ {
+ int ret;
+
+- /* Migration disable and BH disable are needed to protect per-cpu
+- * redirect_info between BPF prog and skb_do_redirect().
++ /* Disabling BH is needed to protect per-CPU bpf_redirect_info between
++ * BPF prog and skb_do_redirect().
+ */
+- migrate_disable();
+ local_bh_disable();
+ bpf_compute_data_pointers(skb);
+ ret = bpf_prog_run_save_cb(lwt->prog, skb);
+@@ -78,7 +77,6 @@ static int run_lwt_bpf(struct sk_buff *s
+ }
+
+ local_bh_enable();
+- migrate_enable();
+
+ return ret;
+ }