lkml.org 
[lkml]   [2015]   [Aug]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] sched: fix tsk->pi_lock isn't held when do_set_cpus_allowed()
From
Date
On 8/25/15 4:30 PM, Ingo Molnar wrote:
> * Wanpeng Li <wanpeng.li@hotmail.com> wrote:
>
>>>> --- a/kernel/cpuset.c
>>>> +++ b/kernel/cpuset.c
>>>> @@ -2376,8 +2376,12 @@ void cpuset_cpus_allowed(struct task_struct *tsk, struct cpumask *pmask)
>>>> void cpuset_cpus_allowed_fallback(struct task_struct *tsk)
>>>> {
>>>> + unsigned long flags;
>>>> +
>>>> rcu_read_lock();
>>>> + raw_spin_lock_irqsave(&tsk->pi_lock, flags);
>>>> do_set_cpus_allowed(tsk, task_cs(tsk)->effective_cpus);
>>>> + raw_spin_lock_irqsave(&tsk->pi_lock, flags);
>>> Just curious, Will introduce deadlock after acquire lock twice? ;)
>> Could you point out where acquires lock twice?
> In the code you quote?

Shame me, sorry for sending out the wrong version. I fix in it soon in v2.

Regards,
Wanpeng Li

>
> Thanks,
>
> Ingo



\
 
 \ /
  Last update: 2015-08-25 11:01    [W:0.454 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site