cvs commit: src/sys/fs/devfs devfs_vfsops.c

Poul-Henning Kamp phk at FreeBSD.org
Mon Jan 3 23:52:27 PST 2005


phk         2005-01-04 07:52:26 UTC

  FreeBSD src repository

  Modified files:
    sys/fs/devfs         devfs_vfsops.c 
  Log:
  Unsupport forceful unmounts of DEVFS.
  
  After disscussing things I have decided to take the easy and
  consistent 90% solution instead of aiming for the very involved 99%
  solution.
  
  If we allow forceful unmounts of DEVFS we need to decide how to handle
  the devices which are in use through this filesystem at the time.
  
  We cannot just readopt the open devices in the main /dev instance since
  that would open us to security issues.
  
  For the majority of the devices, this is relatively straightforward
  as we can just pretend they got revoke(2)'ed.
  
  Some devices get tricky:  /dev/console and /dev/tty for instance
  does a sort of recursive open of the real console device.   Other devices
  may be mmap'ed (kill the processes ?).
  
  And then there are disk devices which are mounted.
  
  The correct thing here would be to recursively unmount the filesystems
  mounte from devices from our DEVFS instance (forcefully) and if
  this succeeds, complete the forcefully unmount of DEVFS.  But if
  one of the forceful unmounts fail we cannot complete the forceful
  unmount of DEVFS, but we are likely to already have severed a lot
  of stuff in the process of trying.
  
  Event attempting this would be a lot of code for a very far out
  corner-case which most people would never see or get in touch with.
  
  It's just not worth it.
  
  Revision  Changes    Path
  1.39      +1 -1      src/sys/fs/devfs/devfs_vfsops.c


More information about the cvs-all mailing list