DragonFly BSD
DragonFly commits List (threaded) for 2006-05
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

cvs commit: src/sys/vfs/deadfs dead_vnops.c


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 24 May 2006 18:20:07 -0700 (PDT)

dillon      2006/05/24 18:20:07 PDT

DragonFly src repository

  Modified files:
    sys/vfs/deadfs       dead_vnops.c 
  Log:
  When a vnode is vgone()'d its v_ops is replaced with dead_vnode_ops.
  dead_vnode_ops replaces VOP_LOCK with a dummy routine that just returns
  TRUE.
  
  This blows up anyone actually trying to access the vnode by improperly
  returning a successful lock which then panics the machine when the caller
  tries to unlock it.  This also screws up VOP_LOCK vs vx_lock() interactions
  and can theoretically create other problems.
  
  Normally vgone()'d vnodes have no references and this isn't a problem.
  The two notable exceptions are (1) when revoke() is called on a device
  (i.e. tty), and (2) when a procfs or linprocfs vnode is destroyed due
  to a process exit while another process is accessing it.
  
  Remove dead_lock().  Dead vnodes revert to defaultops which implement
  the expected lockmgr lock.
  
  Revision  Changes    Path
  1.17      +0 -13     src/sys/vfs/deadfs/dead_vnops.c


http://www.dragonflybsd.org/cvsweb/src/sys/vfs/deadfs/dead_vnops.c.diff?r1=1.16&r2=1.17&f=u



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]