From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 25 14:43:16 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BB4241065674; Fri, 25 Apr 2008 14:43:16 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from falcon.cybervisiontech.com (falcon.cybervisiontech.com [217.20.163.9]) by mx1.freebsd.org (Postfix) with ESMTP id 4F3968FC22; Fri, 25 Apr 2008 14:43:16 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from localhost (localhost [127.0.0.1]) by falcon.cybervisiontech.com (Postfix) with ESMTP id 114BF74401A; Fri, 25 Apr 2008 17:43:15 +0300 (EEST) X-Virus-Scanned: Debian amavisd-new at falcon.cybervisiontech.com Received: from falcon.cybervisiontech.com ([127.0.0.1]) by localhost (falcon.cybervisiontech.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QLoApSOOKk+Y; Fri, 25 Apr 2008 17:43:14 +0300 (EEST) Received: from [10.2.1.87] (gateway.cybervisiontech.com.ua [88.81.251.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by falcon.cybervisiontech.com (Postfix) with ESMTP id 8D6EB74400C; Fri, 25 Apr 2008 17:43:14 +0300 (EEST) Message-ID: <4811EE01.7050207@icyb.net.ua> Date: Fri, 25 Apr 2008 17:43:13 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.12 (X11/20080311) MIME-Version: 1.0 To: Kostik Belousov References: <480E4269.2090604@icyb.net.ua> <480FBAB9.1000904@icyb.net.ua> <48103F36.6060707@icyb.net.ua> <200804240811.26183.jhb@freebsd.org> <4810FD1E.70602@icyb.net.ua> <20080425095009.GD18958@deviant.kiev.zoral.com.ua> <4811E6BC.4060306@icyb.net.ua> <20080425143646.GF18958@deviant.kiev.zoral.com.ua> In-Reply-To: <20080425143646.GF18958@deviant.kiev.zoral.com.ua> Content-Type: text/plain; charset=KOI8-U; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: devctl (alike?) for devfs X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Apr 2008 14:43:16 -0000 on 25/04/2008 17:36 Kostik Belousov said the following: > The malloc and free cannot be called while holding dev_mtx, this causes > the LORs. Please, look at the rev. 1.207, 1.210 of the kern/kern_conf.c > for the workarounds for the malloc issues. It seems that you may abuse the > dev_unlock_and_free() to make the notifications. > > Also, I think it is wrong to establish the lock ordering relations > between the process subsystem and cdev. Thank you for hand-guiding me! This seems to be a bit more complex than I originally thought, so I guess I'll have to get back to this after vacation (I want to stay as far from computers as possible during it). -- Andriy Gapon