From: "Pekka Enberg" <penberg@cs.helsinki.fi>
To: "Eric Dumazet" <dada1@cosmosbay.com>
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
hch@infradead.org, alan@lxorguk.ukuu.org.uk, serue@us.ibm.com
Subject: Re: [PATCH 2/7] revoke: add f_light flag for struct file
Date: Fri, 9 Mar 2007 12:43:36 +0200 [thread overview]
Message-ID: <84144f020703090243j6fd49b5eoa23f4cc12866725a@mail.gmail.com> (raw)
In-Reply-To: <200703091108.58371.dada1@cosmosbay.com>
On 3/9/07, Eric Dumazet <dada1@cosmosbay.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@cosmosbay.com> wrote:
> Also, the thing is racy.
Aah, fget_light() indeed has a race window between fcheck_files() and
set_f_light().
next prev parent reply other threads:[~2007-03-09 10:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-09 8:14 Pekka J Enberg
2007-03-09 10:08 ` Eric Dumazet
2007-03-09 10:43 ` Pekka Enberg [this message]
2007-03-09 11:13 ` Eric Dumazet
2007-03-09 11:52 ` Pekka Enberg
2007-03-09 11:58 ` Pekka Enberg
2007-03-09 14:12 ` Alan Cox
2007-03-09 13:13 ` Pekka J Enberg
2007-03-09 16:11 ` Benjamin LaHaise
2007-03-09 17:02 ` Pekka Enberg
2007-03-09 17:47 ` Eric Dumazet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=84144f020703090243j6fd49b5eoa23f4cc12866725a@mail.gmail.com \
--to=penberg@cs.helsinki.fi \
--cc=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=dada1@cosmosbay.com \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=serue@us.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®