From owner-freebsd-current Wed Jan 22 5:48:44 2003 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 60B0F37B401; Wed, 22 Jan 2003 05:48:42 -0800 (PST) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2338C43E4A; Wed, 22 Jan 2003 05:48:41 -0800 (PST) (envelope-from ticso@cicely8.cicely.de) Received: from cicely5.cicely.de (cicely5.cicely.de [IPv6:3ffe:400:8d0:301:200:92ff:fe9b:20e7]) by srv1.cosmo-project.de (8.12.5/8.12.5) with ESMTP id h0MDmRUc028955 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Wed, 22 Jan 2003 14:48:37 +0100 (CET) (envelope-from ticso@cicely8.cicely.de) Received: from cicely8.cicely.de (cicely8.cicely.de [10.1.1.10]) by cicely5.cicely.de (8.12.6/8.12.6) with ESMTP id h0MDmNCR063445 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Wed, 22 Jan 2003 14:48:24 +0100 (CET) (envelope-from ticso@cicely8.cicely.de) Received: from cicely8.cicely.de (localhost [127.0.0.1]) by cicely8.cicely.de (8.12.6/8.12.6) with ESMTP id h0MDmMMS010287; Wed, 22 Jan 2003 14:48:22 +0100 (CET) (envelope-from ticso@cicely8.cicely.de) Received: (from ticso@localhost) by cicely8.cicely.de (8.12.6/8.12.6/Submit) id h0MDmMt1010286; Wed, 22 Jan 2003 14:48:22 +0100 (CET) Date: Wed, 22 Jan 2003 14:48:21 +0100 From: Bernd Walter To: phk@freebsd.org Cc: Joerg Wunsch , ticso@cicely.de, freebsd-current@freebsd.org Subject: Re: I want a sysctl kern.allow_shooting_into_my_foot! Message-ID: <20030122134820.GD758@cicely8.cicely.de> Reply-To: ticso@cicely.de References: <20030122135320.A70341@uriah.heep.sax.de> <25634.1043242828@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <25634.1043242828@critter.freebsd.dk> X-Operating-System: FreeBSD cicely8.cicely.de 5.0-CURRENT i386 User-Agent: Mutt/1.5.1i Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, Jan 22, 2003 at 02:40:28PM +0100, phk@freebsd.org wrote: > In message <20030122135320.A70341@uriah.heep.sax.de>, Joerg Wunsch writes: > > >Here's the result. What does it mean to me? (debug flag set from > >DDB, and turned off in single-user again.) > > Here's the bug: > > g_dev_open(da1a, 3, 0, 0) > > da1a opened (FREAD|FWRITE) > > g_access_rel(0xc1178a40(da1a), 1, 1, 0) > open delta:[r1w1e0] old:[r0w0e0] provider:[r0w0e0] 0xc11d4f00(da1a) > g_post_event(2, 0, 0, 0xc11d4f00, 0xc1178a40) > g_access_rel(0xc1178f40(da1), 1, 1, 1) > open delta:[r1w1e1] old:[r0w0e0] provider:[r0w0e0] 0xc1194d00(da1) > g_post_event(2, 0, 0, 0xc1194d00, 0xc1178f40) > g_disk_access(da1, 1, 1, 1) > g_do_event(0xc1178780) 2 m:0 g:0 p:0xc11d4f00 c:0xc1178a40 - > EV_SPOILED(0xc11d4f00(da1a),0xc1178a40) > g_do_event(0xc1178740) 2 m:0 g:0 p:0xc1194d00 c:0xc1178f40 - > EV_SPOILED(0xc1194d00(da1),0xc1178f40) > spoiling 0xc1178e40 (da1) (0) > g_dev_close(da1a, 0, 0, 0) > > da1a closed but without FREAD|FWRITE, which turns the close into a no-op. [125]cicely5# grep d_open * grep: CVS: Operation not permitted vinumext.h:d_open_t vinumopen; vinumio.c: drive->lasterror = (dsw->d_open) (drive->dev, FWRITE | FREAD, 0, NULL); Exit 2 [126]cicely5# grep d_close * grep: CVS: Operation not permitted vinumext.h:d_close_t vinumclose; vinumio.c: error = (*devsw(drive->dev)->d_close) (drive->dev, 0, 0, NULL); Exit 2 You are saying that the close should read? error = (*devsw(drive->dev)->d_close) (drive->dev, FWRITE | FREAD, 0, NULL); -- B.Walter COSMO-Project http://www.cosmo-project.de ticso@cicely.de Usergroup info@cosmo-project.de To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message