From starkhome!gene@sbstark.cs.sunysb.edu Sat Dec 3 18:33:17 1994 Received: from sbstark.cs.sunysb.edu (sbstark.cs.sunysb.edu [130.245.1.47]) by freefall.cdrom.com (8.6.8/8.6.6) with ESMTP id SAA02147 for ; Sat, 3 Dec 1994 18:31:52 -0800 Received: from starkhome.UUCP (root@localhost) by sbstark.cs.sunysb.edu (8.6.9/8.6.9) with UUCP id VAA21129 for FreeBSD-gnats-submit@freebsd.org; Sat, 3 Dec 1994 21:29:35 -0500 Received: by starkhome.cs.sunysb.edu (8.6.9/1.34) id VAA00713; Sat, 3 Dec 1994 21:31:24 -0500 Message-Id: <199412040231.VAA00713@starkhome.cs.sunysb.edu> Date: Sat, 3 Dec 1994 21:31:24 -0500 From: starkhome!gene@sbstark.cs.sunysb.edu (Gene Stark) Reply-To: starkhome!gene@sbstark.cs.sunysb.edu To: FreeBSD-gnats-submit@freebsd.org Subject: ftopen fails to check if device is attached X-Send-Pr-Version: 3.2 >Number: 38 >Category: kern >Synopsis: ftopen fails to check if device is attached >Confidential: no >Severity: serious >Priority: medium >Responsible: core (FreeBSD core team) >State: closed >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Dec 3 18:40:01 1994 >Closed-Date: Sat Dec 3 19:10:25 PST 1994 >Last-Modified: >Originator: Gene Stark >Release: FreeBSD 2.1.0-Development i386 >Organization: >Environment: >Description: If a process attempts to open a floppy tape device when the device has been configured in the kernel, but did not probe and attach on bootup, then a panic will occur. >How-To-Repeat: Configure a kernel with floppy tape, boot it on a machine without a floppy tape drive, and try to open a floppy tape device. >Fix: Apply the following diffs to ft.c: *** ft.c.old Tue Nov 15 10:13:46 1994 --- ft.c Sat Dec 3 18:49:21 1994 *************** *** 2057,2062 **** --- 2057,2064 ---- if (ftu >= NFT) return(ENXIO); fdc = ft_data[ftu].fdc; + if ((fdc == NULL) || (ft_data[ftu].type == NO_TYPE)) + return(ENXIO); /* check for controller already busy with tape */ if (fdc->flags & FDC_TAPE_BUSY) return(EBUSY); >Release-Note: >Audit-Trail: Fix applied. Needs further review in context of entire floppy driver. State-Changed-From-To: open->closed State-Changed-By: jkh State-Changed-When: Sat Dec 3 19:10:25 PST 1994 State-Changed-Why: This fix will stop the panics. The fact that the panics were induced by making th attach disabled by default needs review >Unformatted: