From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 11 15:51:44 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AA13116A41F for ; Wed, 11 Jan 2006 15:51:44 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5D3E143D55 for ; Wed, 11 Jan 2006 15:51:44 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 16FAC46B96; Wed, 11 Jan 2006 10:51:43 -0500 (EST) Date: Wed, 11 Jan 2006 15:51:47 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: TSaplin Mikhail In-Reply-To: <200601031847.22199.tsmm@list.ru> Message-ID: <20060111154939.S28748@fledge.watson.org> References: <200601031847.22199.tsmm@list.ru> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org Subject: Re: 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: Wed, 11 Jan 2006 15:51:44 -0000 On Tue, 3 Jan 2006, TSaplin Mikhail wrote: > Hi all i have a problem with devfs device hiding. > My system is FreeBSD 6.0 (i386 and amd64, compiled from last sunday source > (RELENG_6)) > > After mounting defs: > #mount -t devfs devfs /tmp/proba > > first devfs command: > # devfs -m /tmp/proba rule add type disk hide > devfs rule: ioctl DEVFSIO_RADD: Input/output error > > the second command hangs: > # devfs -m /tmp/proba rule add type disk hide > > command doesnt responds on HUP and TERM signals A week or two ago I fixed a bug in devfs where an error condition results in a lock leak, followed by hanging processes and a deadlock. I merged the change to RELENG_6 this morning having returned from India yesterday night. If a fair number of people are running into this, we may want to merge it to RELENG_6_0 and do an errata announcement for it. The change you want is this one: revision 1.21 date: 2006/01/03 09:49:10; author: rwatson; state: Exp; lines: +4 -2 When returning EIO from DEVFSIO_RADD ioctl, drop the exclusive rule lock. Otherwise the system comes to a rather sudden and grinding halt. MFC after: 1 week I ran into it while on travel, as I was trying to get devfs to make /dev/bpf* readable by the operator group, and typed the command wrong. The RELENG_6 revision is devfs_rule.c:1.14.2.3. Robert N M Watson