From owner-freebsd-geom@FreeBSD.ORG Sun Feb 1 10:13:13 2004 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 66C1416A4CE; Sun, 1 Feb 2004 10:13:13 -0800 (PST) Received: from mailbox.univie.ac.at (mail.univie.ac.at [131.130.1.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0DFA743D45; Sun, 1 Feb 2004 10:13:12 -0800 (PST) (envelope-from l.ertl@univie.ac.at) Received: from wireless (adslle.cc.univie.ac.at [131.130.102.11]) i11ID6YM301446; Sun, 1 Feb 2004 19:13:07 +0100 Date: Sun, 1 Feb 2004 19:12:57 +0100 (CET) From: Lukas Ertl To: freebsd-geom@freebsd.org Message-ID: <20040201190653.M613@korben.in.tern> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-DCC-ZID-Univie-Metrics: imap 4244; Body=0 Fuz1=0 Fuz2=0 cc: sos@freebsd.org Subject: Panic in g_disk_done() with atacontrol detach X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Feb 2004 18:13:13 -0000 Hi, I can provoke a panic when doing "atacontrol detach 1" if there's an active filesystem on the disk being detached. The panic happens in g_disk_done() at: devstat_end_transaction_bio(dp->d_devstat, bp2); The problem obviously is that ad_detach() calls disk_destroy() which nulls out the softc, and in g_disk_done() this softc is referenced again. The question is: is this an unsupported operation in the sense of "don't do that"? If yes, then "atacontrol detach" should probably refuse to do the actual detach when there are I/O requests running, this would prevent a lot of foot shooting. regards, le -- Lukas Ertl eMail: l.ertl@univie.ac.at UNIX Systemadministrator Tel.: (+43 1) 4277-14073 Vienna University Computer Center Fax.: (+43 1) 4277-9140 University of Vienna http://mailbox.univie.ac.at/~le/