Infinite loop in devfs_create()

Andrew Gallatin gallatin at
Tue Aug 16 13:06:48 GMT 2005

Antoine Brodin writes:
 > Kris Kennaway <kris at> wrote:
 > > On Fri, Aug 12, 2005 at 08:43:26PM -0400, Kris Kennaway wrote:
 > > > I have an SMP amd64 package machine that has deadlocked, apparently
 > > > here:

 > > This could explain some mysterious deadlocks I've been getting on
 > > sparc machines too, which also cycle through md devices in a similar
 > > way.  I bet something is not being cleaned up properly when the
 > > devices are unconfigured, and eventually devfs is filling up all
 > > available inodes (1024) and failing gracelessly.
 > I'm not sure but this may be related to PR: kern/81588

I mentioned the same suspicious indentation in revision 1.172 of
kern/kern_conf.c to phk back in April.  He told me then:

		 Hmm, that looks like an indentation bug, it is all
		 part of the condition for being able to release it at
		 that time.

Speaking of devfs problems along these lines, it used to be that a
simple shell script which opened a cloning device could be used to DOS
a FreeBSD 6.0 box, since the device cloning code doesn't reap unused
clones.  ( kldload nmdm; while true; do touch /dev/nmdm; done).

It looks like your patch is intended to fix the problem..  I hope
phk looks at it..


More information about the freebsd-current mailing list