sysrq_handle_sched_ext_reset() is called from __handle_sysrq(), which already holds rcu_read_lock() while invoking the sysrq handler. Remove the redundant rcu_read_lock/unlock() pair.
Unified · Split
| @@ -7914,13 +7914,11 @@ static void sysrq_handle_sched_ext_reset(u8 key) · 7913 unmodified lines | ||
| 7914 | 7914 | { |
| 7915 | 7915 | struct scx_sched *sch; |
| 7916 | 7916 | |
| 7917 | − rcu_read_lock(); | |
| 7918 | 7917 | sch = rcu_dereference(scx_root); |
| 7919 | 7918 | if (likely(sch)) |
| 7920 | 7919 | scx_disable(sch, SCX_EXIT_SYSRQ); |
| 7921 | 7920 | else |
| 7922 | 7921 | pr_info("sched_ext: BPF schedulers not loaded\n"); |
| 7923 | − rcu_read_unlock(); | |
| 7924 | 7922 | } |
| 7925 | 7923 | |
| 7926 | 7924 | static const struct sysrq_key_op sysrq_sched_ext_reset_op = { |