DragonFly BSD
DragonFly submit List (threaded) for 2003-12
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: kern.xfile sysctl


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Sat, 6 Dec 2003 12:49:22 -0800 (PST)

: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@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@xxxxxxxxxxxxx>



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