On freebsd 5, when you use a lot of bpf(4), and you stop using them, and then you run something like /etc/periodic/weekly/310.locate , the bpf(4) go away. On -current, this doesn't seem to work anymore. Fix: I don't have a fix, but revision 1.172 of kern/kern_conf.c looks suspect, especially the lines: %%% + if (dev->si_usecount == 0 && + (dev->si_flags & SI_CHEAPCLONE) && (dev->si_flags & SI_NAMED)) if (dev->si_devsw == NULL && dev->si_refcount == 0) { LIST_REMOVE(dev, si_list); flag = 1; %%% The indentation suggests that a line is missing... How-To-Repeat: Use something like this: #!/usr/bin/env perl my $i; my $s; for ($i = 0; $i < 1000; $i++) { $s = "/dev/bpf".$i; system "ls $s"; } and then run /etc/periodic/weekly/310.locate , the devices don't go away.
Responsible Changed From-To: freebsd-bugs->phk This sounds like it's in phk's areas of interest.
The attached patch seems to do the trick. However I don't unterstand all the code so it probably needs a good review.
Responsible Changed From-To: phk->freebsd-bugs return to the pool (approved by phk)
For bugs matching the following criteria: Status: In Progress Changed: (is less than) 2014-06-01 Reset to default assignee and clear in-progress tags. Mail being skipped
Take; closed as "overcome by events" -- the last instance of an SI_CHEAPCLONE device I could find was 2010 and I've since axed SI_CHEAPCLONE entirely, so it's safe to say this isn't a problem in any stable branch or head.