On Thu, Jun 11, 2015 at 1:37 PM, Linus Torvalds <torva...@linux-foundation.org> wrote: > > Don't use "for_each_process_thread(g, p)". You only care about each > mm, and threads all share the same mm, so just do > > for_each_process(p) > > instead of iterating over all threads too.
Hmm. I may be wrong. It strikes me that one of the group leaders might have exited but the subthreads live on. We'd see p->mm being NULL, even though the mm was originally in use. Ugh. So maybe the code really does need to iterate over all threads. Linus -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/