cvs commit: src/sys/kern uipc_usrreq.c
Alfred Perlstein
alfred at freebsd.org
Fri Jun 11 01:30:35 GMT 2004
* Alfred Perlstein <alfred at freebsd.org> [040610 18:26] wrote:
> * Robert Watson <rwatson at FreeBSD.org> [040610 14:34] wrote:
> > rwatson 2004-06-10 21:34:38 UTC
> >
> > FreeBSD src repository
> >
> > Modified files:
> > sys/kern uipc_usrreq.c
> > Log:
> > Introduce a subsystem lock around UNIX domain sockets in order to protect
> > global and allocated variables. This strategy is derived from work
> > originally developed by BSDi for BSD/OS, and applied to FreeBSD by Sam
> > Leffler:
There's also a bug here in the locking I added for files/filedescs.
On line 1525 nfiles is accessed without the filelist_lock held, so
its value is inconsistant. A fix would be to peek at nfiles, do
the allocation, then lock the filelist lock, then check the value
to see if it changed if it changed to something lower, then free
and re-malloc more memory.
--
- Alfred Perlstein
- Research Engineering Development Inc.
- email: bright at mu.org cell: 408-480-4684
More information about the cvs-src
mailing list