Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Jul 2004 23:56:09 +0000 (UTC)
From:      Brian Feldman <green@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/vm vm_page.c
Message-ID:  <200407212356.i6LNu9Z6076388@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
green       2004-07-21 23:56:09 UTC

  FreeBSD src repository

  Modified files:
    sys/vm               vm_page.c 
  Log:
  Fix a race in vm_page_sleep_if_busy().  Due to vm_object locking
  being incomplete, it currently has to know how to drop and pick back
  up the vm_object's mutex if it has to sleep and drop the page queue
  mutex.  The problem with this is that if the page is busy, while we
  are sleeping, the page can be freed and object disappear.  When trying
  to lock m->object, we'd get a stale or NULL pointer and crash.
  
  The object is now cached, but this makes the assumption that
  the object is referenced in some manner and will not itself
  disappear while it is unlocked.  Since this only happens if
  the object is locked, I had to remove an assumption earlier in
  contigmalloc() that reversed the order of locking the object and
  doing vm_page_sleep_if_busy(), not the normal order.
  
  Revision  Changes    Path
  1.289     +12 -4     src/sys/vm/vm_page.c



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