File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -746,9 +746,9 @@ static int jump_label_add_module(struct module *mod)
746
746
kfree (jlm );
747
747
return - ENOMEM ;
748
748
}
749
- preempt_disable ();
750
- jlm2 -> mod = __module_address ((unsigned long )key );
751
- preempt_enable ();
749
+ scoped_guard ( rcu )
750
+ jlm2 -> mod = __module_address ((unsigned long )key );
751
+
752
752
jlm2 -> entries = static_key_entries (key );
753
753
jlm2 -> next = NULL ;
754
754
static_key_set_mod (key , jlm2 );
@@ -906,13 +906,13 @@ static void jump_label_update(struct static_key *key)
906
906
return ;
907
907
}
908
908
909
- preempt_disable ();
910
- mod = __module_address ((unsigned long )key );
911
- if (mod ) {
912
- stop = mod -> jump_entries + mod -> num_jump_entries ;
913
- init = mod -> state == MODULE_STATE_COMING ;
909
+ scoped_guard (rcu ) {
910
+ mod = __module_address ((unsigned long )key );
911
+ if (mod ) {
912
+ stop = mod -> jump_entries + mod -> num_jump_entries ;
913
+ init = mod -> state == MODULE_STATE_COMING ;
914
+ }
914
915
}
915
- preempt_enable ();
916
916
#endif
917
917
entry = static_key_entries (key );
918
918
/* if there are no users, entry can be NULL */
You can’t perform that action at this time.
0 commit comments