RE: [PATCH] exec: make de_thread() freezable

2018-11-11 Thread Chanho Min
> Thanks, but please note another schedule() in "if > (!thread_group_leader(tsk))" > branch, we probably want to change it too? > > Oleg. Sounds right, The thread group leader might be frozen as well. I'll prepare v2.

RE: [PATCH] exec: make de_thread() freezable

2018-11-11 Thread Chanho Min
> Thanks, but please note another schedule() in "if > (!thread_group_leader(tsk))" > branch, we probably want to change it too? > > Oleg. Sounds right, The thread group leader might be frozen as well. I'll prepare v2.

Re: [PATCH] exec: make de_thread() freezable

2018-11-09 Thread Oleg Nesterov
On 11/09, Chanho Min wrote: > > @@ -1083,7 +1084,7 @@ static int de_thread(struct task_struct *tsk) > while (sig->notify_count) { > __set_current_state(TASK_KILLABLE); > spin_unlock_irq(lock); > - schedule(); > + freezable_schedule();

Re: [PATCH] exec: make de_thread() freezable

2018-11-09 Thread Oleg Nesterov
On 11/09, Chanho Min wrote: > > @@ -1083,7 +1084,7 @@ static int de_thread(struct task_struct *tsk) > while (sig->notify_count) { > __set_current_state(TASK_KILLABLE); > spin_unlock_irq(lock); > - schedule(); > + freezable_schedule();

[PATCH] exec: make de_thread() freezable

2018-11-09 Thread Chanho Min
Suspend fails due to the exec family of functions blocking the freezer. The casue is that de_thread() sleeps in TASK_UNINTERRUPTIBLE waiting for all sub-threads to die, and we have the deadlock if one of them is frozen. In our machine, it causes freeze timeout as bellows. Freezing of tasks failed

[PATCH] exec: make de_thread() freezable

2018-11-09 Thread Chanho Min
Suspend fails due to the exec family of functions blocking the freezer. The casue is that de_thread() sleeps in TASK_UNINTERRUPTIBLE waiting for all sub-threads to die, and we have the deadlock if one of them is frozen. In our machine, it causes freeze timeout as bellows. Freezing of tasks failed