From owner-freebsd-bugs Tue Jun 25 8:15:51 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 52E0937B413 for ; Tue, 25 Jun 2002 08:10:10 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g5PFAAa32123; Tue, 25 Jun 2002 08:10:10 -0700 (PDT) (envelope-from gnats) Received: from pr93.lublin.sdi.tpnet.pl (pr93.lublin.sdi.tpnet.pl [217.97.36.93]) by hub.freebsd.org (Postfix) with SMTP id 0625237B408 for ; Tue, 25 Jun 2002 08:06:26 -0700 (PDT) Received: (qmail 791 invoked by uid 1001); 25 Jun 2002 15:04:28 -0000 Message-Id: <20020625150428.790.qmail@pr93.lublin.sdi.tpnet.pl> Date: 25 Jun 2002 15:04:28 -0000 From: Michal Pasternak Reply-To: Michal Pasternak To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: i386/39844: PANIC using mount -> atacontrol detach -> ls/cat that device Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 39844 >Category: i386 >Synopsis: PANIC using mount -> atacontrol detach -> ls/cat that device >Confidential: no >Severity: critical >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Jun 25 08:10:09 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Michal Pasternak >Release: FreeBSD 4.6-STABLE i386 >Organization: >Environment: System: FreeBSD pasternak.w.lub.pl 4.6-STABLE FreeBSD 4.6-STABLE #1: Tue Jun 18 04:33:07 CEST 2002 doc@pasternak.w.lub.pl:/usr/obj/usr/src/sys/ILIT i386 >Description: Using devices, that are mounted, but their controllers are detached (using atacontrol) causes PANIC. My config: atapci0: port 0xd000-0xd00f at device 7.1 on pci0 ata0: at 0x1f0 irq 14 on atapci0 ata1: at 0x170 irq 15 on atapci0 ad0: 8223MB [16708/16/63] at ata0-master UDMA66 acd0: CDROM at ata1-slave PIO4 >How-To-Repeat: 1. mount something on 2nd IDE controller (ata1) 2. detach IDE controller (atacontrol detach 1) 3. ls or cat mounted device - system panics >Fix: I have some ideas, like: 1. atacontrol SHOULD NOT allow to detach controllers, which have mounted devices 2. atacountrol should DISPLAY A BIG FAT WARNING and ASK FOR A CONFIRMATION when trying to detach controller with mounted device 3. atacountrol should automagically umount devices 4. manpage should DISPLAY A BIG FAT WARNING 5. additional checks in device drivers (is the device we're trying to read available, together with it's controller) could IMVHO slow things down, but I'm not a kernel hacker, so how should I know >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message