* [PATCH fs/locks 0 of 3] Introduction
@ 2005-07-11 10:32 Olaf Kirch
0 siblings, 0 replies; only message in thread
From: Olaf Kirch @ 2005-07-11 10:32 UTC (permalink / raw)
To: nfs; +Cc: akpm
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-07-11 10:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-11 10:32 [PATCH fs/locks 0 of 3] Introduction Olaf Kirch
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.