Date: Tue, 23 Jun 2009 10:55:21 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: cvs-src-old@freebsd.org Subject: cvs commit: src/sys/kern kern_lockf.c src/sys/sys lockf.h Message-ID: <200906231056.n5NAu8uV081272@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
kib 2009-06-23 10:55:21 UTC FreeBSD src repository Modified files: (Branch: RELENG_7) sys/kern kern_lockf.c sys/sys lockf.h Log: SVN rev 194695 on 2009-06-23 10:55:21Z by kib MFC r192685: 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. Revision Changes Path 1.57.2.10 +15 -2 src/sys/kern/kern_lockf.c 1.20.2.4 +1 -0 src/sys/sys/lockf.h
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906231056.n5NAu8uV081272>