Skip to content

Commit 674b745

Browse files
Ran Tianhtejun
authored andcommitted
cgroup: remove rcu_read_lock()/rcu_read_unlock() in critical section 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>
1 parent 0a2cafe commit 674b745

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

kernel/cgroup/cgroup.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2866,14 +2866,12 @@ int cgroup_migrate(struct task_struct *leader, bool threadgroup,
28662866
* take an rcu_read_lock.
28672867
*/
28682868
spin_lock_irq(&css_set_lock);
2869-
rcu_read_lock();
28702869
task = leader;
28712870
do {
28722871
cgroup_migrate_add_task(task, mgctx);
28732872
if (!threadgroup)
28742873
break;
28752874
} while_each_thread(leader, task);
2876-
rcu_read_unlock();
28772875
spin_unlock_irq(&css_set_lock);
28782876

28792877
return cgroup_migrate_execute(mgctx);

0 commit comments

Comments
 (0)