From owner-cvs-src@FreeBSD.ORG Wed Jul 4 06:56:59 2007 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0C0D816A400; Wed, 4 Jul 2007 06:56:59 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id F06DA13C45E; Wed, 4 Jul 2007 06:56:58 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.8/8.13.8) with ESMTP id l646uwgq099868; Wed, 4 Jul 2007 06:56:58 GMT (envelope-from kib@repoman.freebsd.org) Received: (from kib@localhost) by repoman.freebsd.org (8.13.8/8.13.8/Submit) id l646uwZL099867; Wed, 4 Jul 2007 06:56:58 GMT (envelope-from kib) Message-Id: <200707040656.l646uwZL099867@repoman.freebsd.org> From: Konstantin Belousov Date: Wed, 4 Jul 2007 06:56:58 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/kern kern_conf.c subr_unit.c src/sys/sys systm.h X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jul 2007 06:56:59 -0000 kib 2007-07-04 06:56:58 UTC FreeBSD src repository Modified files: sys/kern kern_conf.c subr_unit.c sys/sys systm.h Log: Since cdev mutex is after system map mutex in global lock order, free() shall not be called while holding cdev mutex. devfs_inos unrhdr has cdev as mutex, thus creating this LOR situation. Postpone calling free() in kern/subr_unit.c:alloc_unr() and nested functions until the unrhdr mutex is dropped. Save the freed items on the ppfree list instead, and provide the clean_unrhdrl() and clean_unrhdr() functions to clean the list. Call clean_unrhdrl() after devfs_create() calls immediately before dropping cdev mutex. devfs_create() is the only user of the alloc_unrl() in the tree. Reviewed by: phk Tested by: Peter Holm LOR: 80 Approved by: re (kensmith) Revision Changes Path 1.207 +2 -0 src/sys/kern/kern_conf.c 1.9 +34 -1 src/sys/kern/subr_unit.c 1.260 +2 -0 src/sys/sys/systm.h