linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Trond Myklebust <trond.myklebust@fys.uio.no>
To: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Andrew Morton <akpm@osdl.org>
Subject: [PATCH 0/5] POSIX Locking fixes. Take 2...
Date: Tue, 29 Jun 2004 20:29:05 -0400	[thread overview]
Message-ID: <1088555277.4573.106.camel@lade.trondhjem.org> (raw)

Chris Wright's Oops appears to show that relying on the fl_pid is
untenable, since CLONE_FILES does not imply CLONE_THREAD.

The alternative fix is to switch to having the locking code entirely
rely on the file_lock->fl_owner field in order to determine whether or
not locks are owned by the same process. In the special cases of fork()
and NPTL threads, this will still lead to correct POSIX behaviour.

For those that like to fool around with CLONE_THREAD or CLONE_FILES on
their own, however, there is no way to guarantee "correct" behaviour.
The effort has therefore gone towards making it consistent, and allowing
the filesystem to override VFS semantics when it is incapable of
following them.
For NFSv2/v3 this means that we have to allow lockd to manage its own
lockowners. In particular the steal_locks() abomination is impossible to
implement, and so the only secure thing to do is to drop those locks
(note that this is not an issue if the process kills all its threads
before calling exec*() as is required to by the SuS).

Cheers,
  Trond

                 reply	other threads:[~2004-06-30  0:29 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1088555277.4573.106.camel@lade.trondhjem.org \
    --to=trond.myklebust@fys.uio.no \
    --cc=akpm@osdl.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).