buffer locking

Nathan C. Burnett ncb at cs.wisc.edu
Thu Jun 30 03:26:59 GMT 2005


I'm working in FreeBSD 5.3-RELEASE.

In various places in the buffer management code (e.g. ibwrite()) the
buffer lock reference count is checked (see below), presumably to make
sure the buffer is safely locked before working with it.  Is there a
reason that it's not neccesary to ensure that the current thread is the
lockholder?  This seems like it could lead to a race condition where, say
ibwrite, is content because SOMEONE has the buffer locked, even if it's
not the current thread.

Thanks,
-Nate


More information about the freebsd-hackers mailing list