kib 862b0fc4e3 The advisory lock may be activated or activated and removed during the
sleep waiting for conditions when the lock may be granted.
To prevent lf_setlock() from accessing possibly freed memory, add reference
counting to the struct lockf_entry. Bump refcount around the sleep.

Make lf_free_lock() return non-zero when structure was freed, and use
this after the sleep to return EINTR to the caller. The error code might
need a clarification, but we cannot return success to usermode, since
the lock is not owned anymore.

Reviewed by:	dfr
Tested by:	pho
MFC after:	1 month
2009-05-24 12:39:38 +00:00
..
2009-05-18 12:03:43 +00:00
2009-05-12 17:05:40 +00:00
2009-05-20 17:19:30 +00:00
2009-05-20 02:51:48 +00:00
2009-03-30 15:01:29 +00:00
2009-04-21 19:14:13 +00:00