From: Olaf Kirch <okir@suse.de>
To: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: nfs@lists.sourceforge.net, akpm@osdl.org
Subject: Re: [PATCH fs/locks 2 of 3] Use proper tgid in locks_remove_posix
Date: Mon, 11 Jul 2005 14:48:41 +0200 [thread overview]
Message-ID: <20050711124840.GR27163@suse.de> (raw)
In-Reply-To: <1121084217.8204.52.camel@lade.trondhjem.org>
On Mon, Jul 11, 2005 at 08:16:57AM -0400, Trond Myklebust wrote:
> m=E5 den 11.07.2005 Klokka 12:32 (+0200) skreiv Olaf Kirch:
> > # Subject: [NFS] Use proper tgid in locks_remove_posix
> > #=20
> > # This patch fixes a problem with lost unlock calls in multithreaded
> > # applications. locks_remove_posix would send a single unlock call wi=
th
> > # the task group ID of the current process, which may not be the same=
as
> > # the tgid of the lock. This patch ensures that we send separate unlo=
ck
> > # calls for different fl_pid values.
>=20
> This doesn't look right. Why should a thread be killing locks that
> belong to a different process?
locks_remove_posix is called when we close a file, i.e. when it is remove=
d
from current->files. The problem arises when the files struct is shared
by several threads with different tgid (which seems to be the default
when using pthreads) - in this case we must make sure we send the
unlock call with the right tgid. Previously we would send the unlock call
using fl_pid =3D current->tgid.
Olaf
--=20
Olaf Kirch | --- o --- Nous sommes du soleil we love when we play
okir@suse.de | / | \ sol.dhoop.naytheet.ah kin.ir.samse.qurax
-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
next prev parent reply other threads:[~2005-07-11 12:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-11 10:32 [PATCH fs/locks 2 of 3] Use proper tgid in locks_remove_posix Olaf Kirch
2005-07-11 12:16 ` Trond Myklebust
2005-07-11 12:48 ` Olaf Kirch [this message]
2005-07-11 13:02 ` Trond Myklebust
2005-07-11 13:16 ` Olaf Kirch
2005-07-11 13:33 ` Peter Staubach
2005-07-11 13:52 ` Trond Myklebust
2005-07-11 14:23 ` Olaf Kirch
2005-07-16 15:15 ` Olaf Hering
2005-07-17 16:42 ` Olaf Kirch
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=20050711124840.GR27163@suse.de \
--to=okir@suse.de \
--cc=akpm@osdl.org \
--cc=nfs@lists.sourceforge.net \
--cc=trond.myklebust@fys.uio.no \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.