Re: /proc dcache deadlock in do_exit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/27, Eric W. Biederman wrote:
>
> Andrew Morton <[email protected]> writes:
> 
> > On Tue, 27 Nov 2007 14:20:22 +0100
> > Andrea Arcangeli <[email protected]> wrote:
> >
> >> do_exit->release_task->mark_inode_dirty_sync->schedule() (will never
> >> come back to run journal_stop)
> >
> > I don't see why the schedule() will not return?  Because the task has
> > PF_EXITING set?  Doesn't TASK_DEAD do that?
> 
> Yes, why do we not come back from schedule?
> 
> If we are not allowed to schedule after setting PF_EXITING before
> we set TASK_DEAD that entire code path sounds brittle and
> error prone.

Yes, it is fine to schedule after release_task(). As Eric pointed out, we
don't race with call_rcu(delayed_put_task_struct), scheduler has another
reference

	dup_task_struct:
		/* One for us, one for whoever does the "release_task()" (usually parent) */
		atomic_set(&tsk->usage,2);



However, with CONFIG_HOTPLUG_CPU we do have the problem here, but this is
off-topic. Preemption is fine, but deactivate_task() is not. We can't migrate
the deactivated released task from the dead CPU.

	migrate_live_tasks() can't find the task after __unhash_process()

	migrate_dead_tasks() doesn't see it after deactivate_task().

And afaics try_to_wake_up() doesn't necessary change task_cpu() if it is
offline.

No? But again, this is offtopic even if I am right.

Oleg.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux