From owner-cvs-all@FreeBSD.ORG Wed Jun 9 18:17:23 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9C4BF16A4CE; Wed, 9 Jun 2004 18:17:23 +0000 (GMT) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id EADCA43D39; Wed, 9 Jun 2004 18:17:22 +0000 (GMT) (envelope-from phk@phk.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.11/8.12.11) with ESMTP id i59IGpvA057260; Wed, 9 Jun 2004 20:16:51 +0200 (CEST) (envelope-from phk@phk.freebsd.dk) To: Pawel Jakub Dawidek From: "Poul-Henning Kamp" In-Reply-To: Your message of "Wed, 09 Jun 2004 19:37:47 +0200." <20040609173747.GT12007@darkness.comp.waw.pl> Date: Wed, 09 Jun 2004 20:16:51 +0200 Message-ID: <57259.1086805011@critter.freebsd.dk> cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org cc: Garrett Wollman Subject: Re: cvs commit: src/sys/kern kern_proc.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jun 2004 18:17:23 -0000 In message <20040609173747.GT12007@darkness.comp.waw.pl>, Pawel Jakub Dawidek w rites: >No, it is still wrong. The only good way is green's way. >You cannot destroy object even if you held its lock, because another >thread can sleep on this lock and it will be destroyed under it. > >So first of all one have to lock whole list of element before will >take one of then and then remove it from the list before list-lock >is released. Again: see kern/tty.c for fresh example. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.