File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -50,16 +50,14 @@ void bpf_sk_storage_free(struct sock *sk)
5050{
5151 struct bpf_local_storage * sk_storage ;
5252
53- migrate_disable ();
54- rcu_read_lock ();
53+ rcu_read_lock_dont_migrate ();
5554 sk_storage = rcu_dereference (sk -> sk_bpf_storage );
5655 if (!sk_storage )
5756 goto out ;
5857
5958 bpf_local_storage_destroy (sk_storage );
6059out :
61- rcu_read_unlock ();
62- migrate_enable ();
60+ rcu_read_unlock_migrate ();
6361}
6462
6563static void bpf_sk_storage_map_free (struct bpf_map * map )
@@ -161,8 +159,7 @@ int bpf_sk_storage_clone(const struct sock *sk, struct sock *newsk)
161159
162160 RCU_INIT_POINTER (newsk -> sk_bpf_storage , NULL );
163161
164- migrate_disable ();
165- rcu_read_lock ();
162+ rcu_read_lock_dont_migrate ();
166163 sk_storage = rcu_dereference (sk -> sk_bpf_storage );
167164
168165 if (!sk_storage || hlist_empty (& sk_storage -> list ))
@@ -213,8 +210,7 @@ int bpf_sk_storage_clone(const struct sock *sk, struct sock *newsk)
213210 }
214211
215212out :
216- rcu_read_unlock ();
217- migrate_enable ();
213+ rcu_read_unlock_migrate ();
218214
219215 /* In case of an error, don't free anything explicitly here, the
220216 * caller is responsible to call bpf_sk_storage_free.
You can’t perform that action at this time.
0 commit comments