@@ -899,8 +899,7 @@ static __always_inline u64 notrace bpf_prog_start_time(void)
899899static u64 notrace __bpf_prog_enter_recur (struct bpf_prog * prog , struct bpf_tramp_run_ctx * run_ctx )
900900 __acquires (RCU )
901901{
902- rcu_read_lock ();
903- migrate_disable ();
902+ rcu_read_lock_dont_migrate ();
904903
905904 run_ctx -> saved_run_ctx = bpf_set_run_ctx (& run_ctx -> run_ctx );
906905
@@ -949,8 +948,7 @@ static void notrace __bpf_prog_exit_recur(struct bpf_prog *prog, u64 start,
949948
950949 update_prog_stats (prog , start );
951950 this_cpu_dec (* (prog -> active ));
952- migrate_enable ();
953- rcu_read_unlock ();
951+ rcu_read_unlock_migrate ();
954952}
955953
956954static u64 notrace __bpf_prog_enter_lsm_cgroup (struct bpf_prog * prog ,
@@ -960,8 +958,7 @@ static u64 notrace __bpf_prog_enter_lsm_cgroup(struct bpf_prog *prog,
960958 /* Runtime stats are exported via actual BPF_LSM_CGROUP
961959 * programs, not the shims.
962960 */
963- rcu_read_lock ();
964- migrate_disable ();
961+ rcu_read_lock_dont_migrate ();
965962
966963 run_ctx -> saved_run_ctx = bpf_set_run_ctx (& run_ctx -> run_ctx );
967964
@@ -974,8 +971,7 @@ static void notrace __bpf_prog_exit_lsm_cgroup(struct bpf_prog *prog, u64 start,
974971{
975972 bpf_reset_run_ctx (run_ctx -> saved_run_ctx );
976973
977- migrate_enable ();
978- rcu_read_unlock ();
974+ rcu_read_unlock_migrate ();
979975}
980976
981977u64 notrace __bpf_prog_enter_sleepable_recur (struct bpf_prog * prog ,
@@ -1033,8 +1029,7 @@ static u64 notrace __bpf_prog_enter(struct bpf_prog *prog,
10331029 struct bpf_tramp_run_ctx * run_ctx )
10341030 __acquires (RCU )
10351031{
1036- rcu_read_lock ();
1037- migrate_disable ();
1032+ rcu_read_lock_dont_migrate ();
10381033
10391034 run_ctx -> saved_run_ctx = bpf_set_run_ctx (& run_ctx -> run_ctx );
10401035
@@ -1048,8 +1043,7 @@ static void notrace __bpf_prog_exit(struct bpf_prog *prog, u64 start,
10481043 bpf_reset_run_ctx (run_ctx -> saved_run_ctx );
10491044
10501045 update_prog_stats (prog , start );
1051- migrate_enable ();
1052- rcu_read_unlock ();
1046+ rcu_read_unlock_migrate ();
10531047}
10541048
10551049void notrace __bpf_tramp_enter (struct bpf_tramp_image * tr )
0 commit comments