Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Jul 2001 05:08:31 -0600 (MDT)
From:      Chad David <davidc@acns.ab.ca>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   kern/29104: [PATCH] md, disklabel and devfs do not play nice
Message-ID:  <200107201108.f6KB8Vn78122@colnta.acns.ab.ca>

next in thread | raw e-mail | index | archive | help

>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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200107201108.f6KB8Vn78122>