cvs commit: src/sys/vm vm_page.c

Brian Feldman green at
Wed Jul 21 16:56:09 PDT 2004

green       2004-07-21 23:56:09 UTC

  FreeBSD src repository

  Modified files:
    sys/vm               vm_page.c 
  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

More information about the cvs-all mailing list