kern.xfile sysctl

Matthew Dillon dillon at apollo.backplane.com
Sat Dec 6 12:50:07 PST 2003


:I have partially ported, partially written the kern.xfile sysctl(kern.file
:in FreeBSD 5.x.) I still have not added any locking, more or less just
:because I don't know how the locking in DragonFly works.
:
:I just wonderd if someone have so input on the patch, or if I should
:commit it.
:
:Patch: http://eirikn.kerneled.com/dragonfly/xfile.sysctl.diff
:
:--=20
:Eirik Nygaard
:eirikn at xxxxxxxxxxxx

    Hmm.  Not bad... it does need a little more work:

    * Change the 'short' field to an 'int' field.  No new 
      structure should use 'short' unless we really need
      extreme compactness.

    * Put a PHOLD()/PRELE() around the current process
      being scanned (sys/proc.h).  Put it just before and
      after the inner for() loop.  Otherwise if the sysctl
      blocks during copyout the process could be ripped
      out from under it.

				    -Matt
				    Matthew Dillon 
				    <dillon at xxxxxxxxxxxxx>





More information about the Submit mailing list