Yes, it's needed for M:N threading library. Here is scenario: Task A
holds a lock and waiting for some event in library, now task B tries
to acquire that lock and waits in kernel and this can create a deadlock.
These tasks are created with CLONE_THREAD (for M:N) flag.
This change (removing pid check) may cause problem for 1:1 (linuxthreads),
where each task has unique pid and tgid. Again, whether that's a right
behavior or not is questionable.
However, with CLONE_THREAD flag, all tasks shares "tgid" value with unique
pid and that's why I suggested earlier to change the "fl_pid" from "pid"
to "tgid" and it works for both the cases (M:N and 1:1).
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/