From owner-freebsd-current@FreeBSD.ORG Sat Nov 26 05:50:02 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E631016A41F for ; Sat, 26 Nov 2005 05:50:02 +0000 (GMT) (envelope-from csaba@beastie.creo.hu) Received: from beastie.creo.hu (www.creo.hu [217.113.62.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4298443D58 for ; Sat, 26 Nov 2005 05:50:01 +0000 (GMT) (envelope-from csaba@beastie.creo.hu) Received: from beastie.creo.hu (localhost [127.0.0.1]) by beastie.creo.hu (8.13.3/8.13.3) with ESMTP id jAQ5lnYh035512 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 26 Nov 2005 06:47:49 +0100 (CET) (envelope-from csaba@beastie.creo.hu) Received: (from csaba@localhost) by beastie.creo.hu (8.13.3/8.13.3/Submit) id jAQ5lmeC035511; Sat, 26 Nov 2005 06:47:48 +0100 (CET) (envelope-from csaba) Date: Sat, 26 Nov 2005 06:47:48 +0100 From: Csaba Henk To: Kris Kennaway Message-ID: <20051126054748.GM2911@beastie.creo.hu> References: <20051125214738.GL2911@beastie.creo.hu> <20051126025620.GA62284@xor.obsecurity.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20051126025620.GA62284@xor.obsecurity.org> User-Agent: Mutt/1.5.9i Cc: freebsd-current@freebsd.org Subject: Re: double close strikes panic if md attaching a corrupt file X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Nov 2005 05:50:03 -0000 On Fri, Nov 25, 2005 at 09:56:20PM -0500, Kris Kennaway wrote: > > I attach two patches, they realize the above ideas, respectively. > > Note that I didn't test either. > > You probably should do so ;-) This isn't the easiest thing for someone > to test without such corrupted media. Umm... I was hoping that someone in the list will suggest a way for easily creating corrupt files. As I don't have a corrupt media, either :) I picked this when Fuse was panicking upon md attaching from a Fuse based filesystem, cf. http://lists.freebsd.org/pipermail/freebsd-ports/2005-November/027724.html The fuse module didn't implement VOP_READ (it rather used a file level "fo_read" method), hence from the point of the md code all files under a Fuse filesystem seem corrupt. So this was triggered. (Since then I added the VOP_READ, btw.) If I test the proposed fixes with a VOP_READ-less fuse module and they will save me from the panic (and work well on traditional fs-es), will you say it's OK? The fuse module lacks a proper audit from "serious" people, so you could dismiss it as well, saying you can't be sure that the problem is not with Fuse... Btw, if you said yes, that means you can as well easily get at a fine "corrupt media" :) Csaba