DragonFly bugs List (threaded) for 2007-08
DragonFly BSD
DragonFly bugs List (threaded) for 2007-08
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: Stacked mounts of procfs/linprocfs


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Sun, 26 Aug 2007 09:27:59 -0700 (PDT)

:Hey,
:
:I just noticed that we can produce stacked mounts of procfs and linprocfs.  Probably not what we want:
:
:% mount|grep procfs
:procfs on /proc (procfs, local)
:procfs on /proc (procfs, local)
:
:I tried looking into where to prevent this, probably in the vfsmount routine.  However I'm a bit out of the loop concerning the namecache, so I'm not sure when I need to lock/release what.
:
:Nevertheless I think we should prevent this behavior.
:
:cheers
:  simon

    Yah, that wouldn't be good.  procfs likes to destroy nodes dynamically
    and that could lead to unmountable filesystems.

    The easiest solution is to add a kernel mount flag (MNTK_*) to the
    mount structure that tells the kernel not to allow mounts under a
    particular mount (e.g. procfs), and just have the kernel check it when
    a mount is attempted.  Probably not more then 10 lines of code if you
    would like to have a go at it.

    					-Matt



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