Module Name: src Committed By: dyoung Date: Wed Mar 25 21:28:50 UTC 2009
Modified Files: src/sys/kern: subr_autoconf.c Log Message: When we attach a pseudo-device, set its cfdata_t's cf_fstate to FSTATE_FOUND, as we do in config_attach_loc(), in order to avoid a DIAGNOSTIC panic in config_detach() if we detach the device. To generate a diff of this commit: cvs rdiff -u -r1.169 -r1.170 src/sys/kern/subr_autoconf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/kern/subr_autoconf.c diff -u src/sys/kern/subr_autoconf.c:1.169 src/sys/kern/subr_autoconf.c:1.170 --- src/sys/kern/subr_autoconf.c:1.169 Sat Mar 14 11:08:28 2009 +++ src/sys/kern/subr_autoconf.c Wed Mar 25 21:28:50 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_autoconf.c,v 1.169 2009/03/14 11:08:28 ad Exp $ */ +/* $NetBSD: subr_autoconf.c,v 1.170 2009/03/25 21:28:50 dyoung Exp $ */ /* * Copyright (c) 1996, 2000 Christopher G. Demetriou @@ -77,7 +77,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.169 2009/03/14 11:08:28 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.170 2009/03/25 21:28:50 dyoung Exp $"); #include "opt_ddb.h" #include "drvctl.h" @@ -1425,6 +1425,11 @@ /* XXX mark busy in cfdata */ + if (cf->cf_fstate != FSTATE_STAR) { + KASSERT(cf->cf_fstate == FSTATE_NOTFOUND); + cf->cf_fstate = FSTATE_FOUND; + } + config_devlink(dev); #if 0 /* XXXJRT not yet */