[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <84144f020703090243j6fd49b5eoa23f4cc12866725a@mail.gmail.com>
Date: Fri, 9 Mar 2007 12:43:36 +0200
From: "Pekka Enberg" <penberg@...helsinki.fi>
To: "Eric Dumazet" <dada1@...mosbay.com>
Cc: akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
hch@...radead.org, alan@...rguk.ukuu.org.uk, serue@...ibm.com
Subject: Re: [PATCH 2/7] revoke: add f_light flag for struct file
On 3/9/07, Eric Dumazet <dada1@...mosbay.com> 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 <dada1@...mosbay.com> 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 majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists