CVSROOT:        /cvs
Module name:    src
Changes by:     m...@cvs.openbsd.org    2022/09/10 10:14:36

Modified files:
        sys/uvm        : uvm_vnode.c uvm_vnode.h 

Log message:
Get rid of the extra vnode reference known as UVM_VNODE_CANPERSIST.

Back in the 4.4BSD days the VM subystem had a OBJ_CANPERSIST flag to
enter objects in a global cached list.  Some of this logic seem to have
been copied to UVM but without the global list.

Unfortunately keeping UVM vnode objects alive after munmap(2)ing the
corresponding region without incrementing the reference count of the
related vnode led to many bugs when the vnode was recycled and/or when
it data where written back to disk (via the page daemon).

The problem is that VM pages might have a non-accounted reference to a
vnode via `pg->uobject'.

Fix "vref used where vget required" panic reported by bluhm@, gkoehler@
and Andrew Krasavinseen on bugs@.

Thanks a lot to semarie@ for co-debugging this issue!

Tested by bluhm@, tb@, miod@.

ok kettenis@, semarie@

Reply via email to