summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_lockf.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Remove some includes include-what-you-use claims don'tjsg2015-03-141-2/+1
| | | | | | | have any direct symbols used. Tested for indirect use by compiling amd64/i386/sparc64 kernels. ok tedu@ deraadt@
* start retiring the nointr allocator. specify PR_WAITOK as a flag as atedu2014-12-191-3/+3
| | | | marker for which pools are not interrupt safe. ok dlg
* include sys/unistd.h where needed instead of indirect reliance. ok jsgtedu2014-11-031-1/+2
|
* POSIX locks should track the process's pid and not the thread's idguenther2012-04-101-2/+2
|
* correct some minor style violationstedu2010-06-291-60/+11
|
* only apply the strict limit on F_SETLK; ok deraadt@ fgsch@otto2009-03-241-2/+2
|
* advisory locks should return ENOLCK if we're out of locks.otto2009-03-231-2/+2
| | | | ok deraadt@ fgs@
* Fix a bunch of problems and races with posix file locking.art2008-09-191-5/+3
| | | | | | | | | | | | | | | | - file descriptor table becomes the owner of the lock instead of the proc. - When grabbing the lock, we check if the fd hasn't changed under our feet, this is more or less impossible to solve without a hack like this. I've banged my head against the wall, I figured out a solution, but implementing it correctly would cost me 12 gray hairs. Screw it, this is ugly, but it works. - Wait until usecount drains before releasing the posix lock in closef. - Add missing FREF/FRELE to sys_flock - keep the pid in the flock struct instead of abusing the fact that we used to use the proc as the lock owner. Pointed out by and discussed with Al Viro, big thanks. miod@ ok
* Use ANSI function declarations and deregister, no binary changepedro2005-11-201-42/+21
|
* revise lockf limit policy. after exceeding "soft limit", start enforcingtedu2005-03-151-3/+14
| | | | a hard limit of 2x. add a comment to this effect. reviewed by miod
* split out uidinfo from kern_proc.c private, use it to store lock count,tedu2005-03-101-15/+53
| | | | | | restrict lock count per uid to a global limit, add sysctl to adjust limit. this prevents a user from creating too many locks. problem noticed by devon o'dell. ok deraadt miod pedro
* useless caddr_t cast removal. same md5s.tedu2004-04-131-2/+2
|
* Get rid of M_LOCKF and use pool for allocating lockf structures.grange2004-01-141-16/+25
| | | | | | From NetBSD. Tested by many people, ok art@.
* remove caddr_t casts. it's just silly to cast something when the functiontedu2003-07-211-3/+3
| | | | takes a void *. convert uiomove to take a void * as well. ok deraadt@
* Remove the advertising clause in the UCB license which Berkeleymillert2003-06-021-6/+2
| | | | rescinded 22 July 1999. Proofed by myself and Theo.
* use %ll instead of %qderaadt2001-09-051-3/+3
|
* Check for negative lock length.gluk2001-07-281-11/+15
| | | | costa@ ok.
* Fix PR1826. tsleep in lf_setlock can return 0 if process was ptrace'd,gluk2001-06-201-177/+125
| | | | | | | | | | | | | | | | | | | | | but not wakeup'ed. In this case one entry can be placed twice at list of blocked locks. As a result block list contain an entry which points to itself. lf_wakelock can't remove such an entry and system livelocks trying to remove a bad entry from block list. Other changes include: - repair debug functions and make vfs_lockf.c compilable with LOCKF_DEBUG - simplify debug printing and remove useless debugging - remove unnecessary casting, replace NOLOCKF with NULL - free -> FREE (use one form over the file) - convert list of blocked locks to use TAILQ_* macroses - lf_addblock() -> TAILQ_INSERT_TAIL - Fix bug in lf_findoverlap(): in old code if (end == -1) && (lf->lf_end == -1) && (lf->lf_start <= start) then lf_findoverlap() return 4 instead of 2 - work more carefully with pointers (probably fix one or two bugs) - use wakeup_one() - KNF
* From NetBSD: 960217 mergeniklas1996-03-031-7/+12
|
* initial import of NetBSD treederaadt1995-10-181-0/+794