Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

lwt: Don't disable migration prio invoking BPF.

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.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Link: https://patch.msgid.link/20240620132727.660738-12-bigeasy@linutronix.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Sebastian Andrzej Siewior and committed by
Jakub Kicinski
3414adbd b22800f9

+2 -4
+2 -4
net/core/lwt_bpf.c
··· 40 40 { 41 41 int ret; 42 42 43 - /* Migration disable and BH disable are needed to protect per-cpu 44 - * redirect_info between BPF prog and skb_do_redirect(). 43 + /* Disabling BH is needed to protect per-CPU bpf_redirect_info between 44 + * BPF prog and skb_do_redirect(). 45 45 */ 46 - migrate_disable(); 47 46 local_bh_disable(); 48 47 bpf_compute_data_pointers(skb); 49 48 ret = bpf_prog_run_save_cb(lwt->prog, skb); ··· 77 78 } 78 79 79 80 local_bh_enable(); 80 - migrate_enable(); 81 81 82 82 return ret; 83 83 }