Skip to content

Commit

Permalink
cgroup: remove rcu_read_lock()/rcu_read_unlock() in critical section …
Browse files Browse the repository at this point in the history
…of spin_lock_irq()

spin_lock_irq() already disable preempt, so remove rcu_read_lock().

Signed-off-by: Ran Tian <tianran_trtr@163.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
  • Loading branch information
Ran Tian authored and Tejun Heo committed Nov 23, 2022
1 parent 0a2cafe commit 674b745
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions kernel/cgroup/cgroup.c
Original file line number Diff line number Diff line change
@@ -2866,14 +2866,12 @@ int cgroup_migrate(struct task_struct *leader, bool threadgroup,
* take an rcu_read_lock.
*/
spin_lock_irq(&css_set_lock);
rcu_read_lock();
task = leader;
do {
cgroup_migrate_add_task(task, mgctx);
if (!threadgroup)
break;
} while_each_thread(leader, task);
rcu_read_unlock();
spin_unlock_irq(&css_set_lock);

return cgroup_migrate_execute(mgctx);

0 comments on commit 674b745

Please sign in to comment.