mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Trond Myklebust <trond.myklebust@fys.uio.no>
To: Akinobu Mita <mita@miraclelinux.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [BUG 2.4] NFS unlocking operation accesses invalid file struct
Date: Thu, 27 Nov 2003 11:23:04 -0500	[thread overview]
Message-ID: <16326.9448.320003.775274@charged.uio.no> (raw)
In-Reply-To: <200311272054.22316.mita@miraclelinux.com>

>>>>> " " == Akinobu Mita <mita@miraclelinux.com> writes:

     > Thanks, Trond.  but, your patch causes memory leak.


Yep. Worse: pthreads assumes that we don't use the pid as the lock
owner. That again means that the test in locks_same_owner() is
incorrect.
For 2.6.x, the NPTL further complicates matters by introducing the
tgid as their equivalent of the posix process id, and not tying
CLONE_THREAD to CLONE_FILES. AFAICS there's nothing we can do about
that...



So then the correct thing to do is indeed to wrap the call to
locks_unlock_delete() with an fget()/fput() pair, and then to remove
the test for fl_pid in locks_same_owner().

We then need to fix lockd so that it generates correct fl_owners for
its locks...

Let me see if I can get that right.

Cheers,
  Trond

  parent reply	other threads:[~2003-11-27 16:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-25 11:00 Akinobu Mita
2003-11-26  0:35 ` Trond Myklebust
2003-11-27 11:54   ` Akinobu Mita
2003-11-27 15:15     ` Gene Heskett
2003-11-27 16:23     ` Trond Myklebust [this message]
2003-12-10  1:06       ` Akinobu Mita
2003-12-10  1:27         ` hanasaki

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=16326.9448.320003.775274@charged.uio.no \
    --to=trond.myklebust@fys.uio.no \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mita@miraclelinux.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®