Skip to content

Commit

Permalink
SUNLIGHT: SCHED: BORE - reset_task_weights_bore: Use RCU lock
Browse files Browse the repository at this point in the history
Description:
 - SCHED: BORE - reset_task_weights_bore: Use RCU lock

Change-Id: Icad8e4e68ea112e0e97bac979e7c013e3b845071
Signed-off-by: Ionut Nechita <ionut_n2001@yahoo.com>
  • Loading branch information
ionutnechita committed Dec 15, 2024
1 parent c51398e commit a59e365
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions kernel/sched/bore.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ static void reset_task_weights_bore(void) {
struct rq *rq;
struct rq_flags rf;

rcu_read_lock();
write_lock_irq(&tasklist_lock);
for_each_process(task) {
if (!task_is_bore_eligible(task)) continue;
Expand All @@ -137,6 +138,7 @@ static void reset_task_weights_bore(void) {
rq_unlock_irqrestore(rq, &rf);
}
write_unlock_irq(&tasklist_lock);
rcu_read_unlock();
}

int sched_bore_update_handler(const struct ctl_table *table, int write,
Expand Down

0 comments on commit a59e365

Please sign in to comment.