Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c355d69b authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "sched: drop related_thread_group_lock before calling call_rcu()"

parents f2c45eda 9cd9be84
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -3964,7 +3964,14 @@ static void remove_task_from_group(struct task_struct *p)

	if (empty_group) {
		list_del(&grp->list);
		/*
		 * RCU, kswapd etc tasks can get woken up from
		 * call_rcu(). As the wakeup path also acquires
		 * the related_thread_group_lock, drop it here.
		 */
		write_unlock(&related_thread_group_lock);
		call_rcu(&grp->rcu, free_related_thread_group);
		write_lock(&related_thread_group_lock);
	}
}