On 3/9/07, Eric Dumazet <[EMAIL PROTECTED]> wrote:
Cannot we use a flag in 'struct files_struct', set to one when the task is
mono-thread (at task creation in fact), and set to 0 when it creates a new
thread  (or when someone remotely access to this "struct files_struct"
in /proc/pid/fd/... )

How does that work? fget_light() has a built-in assumption that as
long as you don't share files_struct, it's okay not to take an extra
reference as current is only one doing close(2) and revoke(2) changes
that. So it's not really about being single-threaded or not.

On 3/9/07, Eric Dumazet <[EMAIL PROTECTED]> wrote:
Also, the thing is racy.

Aah, fget_light() indeed has a race window between fcheck_files() and
set_f_light().
-
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/

Reply via email to