From owner-freebsd-bugs@FreeBSD.ORG Sat May 28 13:50:02 2005 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DAB2516A41F for ; Sat, 28 May 2005 13:50:02 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 65B2443D48 for ; Sat, 28 May 2005 13:50:02 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j4SDo2Hu032575 for ; Sat, 28 May 2005 13:50:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j4SDo2oa032573; Sat, 28 May 2005 13:50:02 GMT (envelope-from gnats) Resent-Date: Sat, 28 May 2005 13:50:02 GMT Resent-Message-Id: <200505281350.j4SDo2oa032573@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Antoine Brodin Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6B2CF16A43B for ; Sat, 28 May 2005 13:47:03 +0000 (GMT) (envelope-from antoine@mna75-2-82-67-196-50.fbx.proxad.net) Received: from barton.dreadbsd.org (madhouse.dreadbsd.org [82.67.196.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id E371A43D1D for ; Sat, 28 May 2005 13:47:00 +0000 (GMT) (envelope-from antoine@mna75-2-82-67-196-50.fbx.proxad.net) Received: from barton.dreadbsd.org (localhost [127.0.0.1]) by barton.dreadbsd.org (8.13.3/8.13.1) with ESMTP id j4SDkuLU004934 for ; Sat, 28 May 2005 15:46:58 +0200 (CEST) (envelope-from antoine@mna75-2-82-67-196-50.fbx.proxad.net) Received: (from antoine@localhost) by barton.dreadbsd.org (8.13.3/8.13.1/Submit) id j4SDkt5F004933; Sat, 28 May 2005 15:46:55 +0200 (CEST) (envelope-from antoine) Message-Id: <200505281346.j4SDkt5F004933@barton.dreadbsd.org> Date: Sat, 28 May 2005 15:46:55 +0200 (CEST) From: Antoine Brodin To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: kern/81588: Devices with SI_CHEAPCLONE flag don't seem to go away when they're no longer used in -current X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Antoine Brodin List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 May 2005 13:50:03 -0000 >Number: 81588 >Category: kern >Synopsis: Devices with SI_CHEAPCLONE flag don't seem to go away when they're no longer used in -current >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat May 28 13:50:01 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Antoine Brodin >Release: FreeBSD 6.0-CURRENT i386 >Organization: none >Environment: System: FreeBSD barton.dreadbsd.org 6.0-CURRENT FreeBSD 6.0-CURRENT #7: Sat May 28 14:52:05 CEST 2005 root@barton.dreadbsd.org:/usr/obj/usr/src/sys/BARTON i386 >Description: 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. >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. >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... >Release-Note: >Audit-Trail: >Unformatted: