Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 May 2009 12:39:38 +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:  <200905241239.n4OCdlCw030318@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
kib         2009-05-24 12:39:38 UTC

  FreeBSD src repository

  Modified files:
    sys/kern             kern_lockf.c 
    sys/sys              lockf.h 
  Log:
  SVN rev 192685 on 2009-05-24 12:39:38Z by kib
  
  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
  
  Revision  Changes    Path
  1.71      +15 -2     src/sys/kern/kern_lockf.c
  1.24      +1 -0      src/sys/sys/lockf.h



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200905241239.n4OCdlCw030318>