The patch titled Subject: kernel/hung_task.c: change hung_task.c to use for_each_process_thread() has been added to the -mm tree. Its filename is hung_task-change-hung_taskc-to-use-for_each_process_thread.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/hung_task-change-hung_taskc-to-use-for_each_process_thread.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/hung_task-change-hung_taskc-to-use-for_each_process_thread.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Aaron Tomlin <atomlin@xxxxxxxxxx> Subject: kernel/hung_task.c: change hung_task.c to use for_each_process_thread() In check_hung_uninterruptible_tasks() avoid the use of deprecated while_each_thread(). The "max_count" logic will prevent a livelock - see commit 0c740d0a ("introduce for_each_thread() to replace the buggy while_each_thread()"). Having said this let's use for_each_process_thread(). Signed-off-by: Aaron Tomlin <atomlin@xxxxxxxxxx> Acked-by: Oleg Nesterov <oleg@xxxxxxxxxx> Cc: David Rientjes <rientjes@xxxxxxxxxx> Cc: Dave Wysochanski <dwysocha@xxxxxxxxxx> Cc: Aaron Tomlin <atomlin@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- kernel/hung_task.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff -puN kernel/hung_task.c~hung_task-change-hung_taskc-to-use-for_each_process_thread kernel/hung_task.c --- a/kernel/hung_task.c~hung_task-change-hung_taskc-to-use-for_each_process_thread +++ a/kernel/hung_task.c @@ -169,7 +169,7 @@ static void check_hung_uninterruptible_t return; rcu_read_lock(); - do_each_thread(g, t) { + for_each_process_thread(g, t) { if (!max_count--) goto unlock; if (!--batch_count) { @@ -180,7 +180,7 @@ static void check_hung_uninterruptible_t /* use "==" to skip the TASK_KILLABLE tasks waiting on NFS */ if (t->state == TASK_UNINTERRUPTIBLE) check_hung_task(t, timeout); - } while_each_thread(g, t); + } unlock: rcu_read_unlock(); } _ Patches currently in -mm which might be from atomlin@xxxxxxxxxx are hung_task-change-hung_taskc-to-use-for_each_process_thread.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html