From owner-freebsd-bugs Fri Jul 20 4:10:16 2001 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 3C85B37B406 for ; Fri, 20 Jul 2001 04:10:06 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f6KBA6j80797; Fri, 20 Jul 2001 04:10:06 -0700 (PDT) (envelope-from gnats) Received: from colnta.acns.ab.ca (h24-68-206-125.sbm.shawcable.net [24.68.206.125]) by hub.freebsd.org (Postfix) with ESMTP id 0BC5D37B401 for ; Fri, 20 Jul 2001 04:08:32 -0700 (PDT) (envelope-from davidc@colnta.acns.ab.ca) Received: (from davidc@localhost) by colnta.acns.ab.ca (8.11.4/8.11.3) id f6KB8Vn78122; Fri, 20 Jul 2001 05:08:31 -0600 (MDT) (envelope-from davidc) Message-Id: <200107201108.f6KB8Vn78122@colnta.acns.ab.ca> Date: Fri, 20 Jul 2001 05:08:31 -0600 (MDT) From: Chad David Reply-To: Chad David To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: kern/29104: [PATCH] md, disklabel and devfs do not play nice 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: 29104 >Category: kern >Synopsis: [PATCH] md, disklabel and devfs do not play nice >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Jul 20 04:10:05 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Chad David >Release: FreeBSD 5.0-CURRENT >Organization: ACNS Inc. >Environment: System:FreeBSD whisper.acns.ab.ca 5.0-CURRENT FreeBSD 5.0-CURRENT #3: Fri Jul 20 04:44:58 GMT 2001 davidc@whisper.acns.ab.ca:/usr/src2/src/sys/i386/compile/GENERIC i386 >Description: When disklabel is run on a md without the full path name to the device a new device is created, even if the device name is silly. If the device is the 'c' device then the error message: WARNING: Driver mistake: repeat make_dev("md10c") is reported. If the md is detached the system crashes with the following error printed over and over: WARNING: Driver mistake: destroy_dev on 95/82 Part of the problem is caused by disklabel auto appending a 'c' onto the device name so md10c becomes md10cc, and then disk_clone() doesn't bother to check for that. >How-To-Repeat: 1) Create a md. mdconfig -a -t swap -s 32m -u 10 2) run disklabel. disklabel md10c (note console output) 3) detach the md. (XXX crashes my local machine). mdconfig -d -u 10 >Fix: Fix disk_clone() so that it does not try and [re]create devices that have bad names. *** subr_disk.c Fri Jul 20 07:12:39 2001 --- /sys/kern/subr_disk.c Fri Jun 15 18:43:58 2001 *************** *** 84,92 **** p = name[i] - 'a'; } - if (name[i+1] != '\0') - continue; - *dev = make_dev(pdev->si_devsw, dkmakeminor(u, s, p), UID_ROOT, GID_OPERATOR, 0640, name); dev_depends(pdev, *dev); --- 84,89 ---- >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message