All of lore.kernel.org
 help / color / mirror / Atom feed
From: Olaf Kirch <okir@suse.de>
To: nfs@lists.sourceforge.net
Cc: akpm@osdl.org
Subject: [PATCH fs/locks 0 of 3] Introduction
Date: Mon, 11 Jul 2005 12:32:32 +0200	[thread overview]
Message-ID: <20050711103232.GF27163@suse.de> (raw)

I recently debugged various file NFS locking problems caused by an
application that would open and close files in one thread, and obtain
posix locks on these file in a second thread. Using a test app, I could
trigger a BUG() in locks_remove_flock within seconds, because there were
still POSIX locks attached to the filp by the time of the final fput().
In addition, stale locks would accumulate on the NFS server.

While this is arguably stupid behavior on the application's part, I think
the kernel should nevertheless not get confused by this. The following
three patches fix three separate issues

 1:	Fixes a miscompare when establishing a lock, which would
 	cause the same lock to be established twice.
 2:	locks_remove_posix would issue a single unlock call using
 	the tgid of the current process, which may not be the tgid
	of the lock. This will cause stale NFS locks not owned by anyone.
 3:	fix the above mentioned race condition

Cheers
Olaf
-- 
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

                 reply	other threads:[~2005-07-11 10:32 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=20050711103232.GF27163@suse.de \
    --to=okir@suse.de \
    --cc=akpm@osdl.org \
    --cc=nfs@lists.sourceforge.net \
    /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.