• Peter Zijlstra's avatar
    sched: fair-group: separate tg->shares from task_group_lock · 8ed36996
    Peter Zijlstra authored
    On Mon, 2008-02-11 at 15:09 +0300, Denis V. Lunev wrote:
    > BUG: sleeping function called from invalid context
    > at /home/den/src/linux-netns26/kernel/mutex.c:209
    > in_atomic():1, irqs_disabled():0
    > no locks held by swapper/0.
    > Pid: 0, comm: swapper Not tainted 2.6.24 #304
    >
    > Call Trace:
    >  <IRQ>  [<ffffffff80252d1e>] ? __debug_show_held_locks+0x15/0x27
    >  [<ffffffff8022c2a8>] __might_sleep+0xc0/0xdf
    >  [<ffffffff8049f1df>] mutex_lock_nested+0x28/0x2a9
    >  [<ffffffff80231294>] sched_destroy_group+0x18/0xea
    >  [<ffffffff8023e835>] sched_destroy_user+0xd/0xf
    >  [<ffffffff8023e8c1>] free_uid+0x8a/0xab
    >  [<ffffffff80233e24>] __put_task_struct+0x3f/0xd3
    >  [<ffffffff80236708>] delayed_put_task_struct+0x23/0x25
    >  [<ffffffff8026fda7>] __rcu_process_callbacks+0x8d/0x215
    >  [<ffffffff8026ff52>] rcu_process_callbacks+0x23/0x44
    >  [<ffffffff8023a2ae>] __do_softirq+0x79/0xf8
    >  [<ffffffff8020f8c3>] ? profile_pc+0x2a/0x67
    >  [<ffffffff8020d38c>] call_softirq+0x1c/0x30
    >  [<ffffffff8020f689>] do_softirq+0x61/0x9c
    >  [<ffffffff8023a233>] irq_exit+0x51/0x53
    >  [<ffffffff8021bd1a>] smp_apic_timer_interrupt+0x77/0xad
    >  [<ffffffff8020ce3b>] apic_timer_interrupt+0x6b/0x70
    >  <EOI>  [<ffffffff8020b0dd>] ? default_idle+0x43/0x76
    >  [<ffffffff8020b0db>] ? default_idle+0x41/0x76
    >  [<ffffffff8020b09a>] ? default_idle+0x0/0x76
    >  [<ffffffff8020b186>] ? cpu_idle+0x76/0x98
    
    separate the tg->shares protection from the task_group lock.
    Reported-by: default avatarDenis V. Lunev <den@openvz.org>
    Tested-by: default avatarDenis V. Lunev <den@openvz.org>
    Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
    Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
    8ed36996
sched.c 196 KB