Date: Wed, 27 Jun 2012 10:22:59 -0400 From: Michael Butler <imb@protected-networks.net> To: "Kenneth D. Merry" <ken@freebsd.org> Cc: Benjamin Kaduk <kaduk@mit.edu>, current@freebsd.org Subject: Re: Removing an SDHC card causes a kernel panic on -current Message-ID: <4FEB1743.506@protected-networks.net> In-Reply-To: <20120627022909.GA153@nargothrond.kdm.org> References: <4FE9D958.4000901@protected-networks.net> <alpine.GSO.1.10.1206261929300.18441@multics.mit.edu> <20120627022909.GA153@nargothrond.kdm.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 06/26/12 22:29, Kenneth D. Merry wrote: > On Tue, Jun 26, 2012 at 19:41:07 -0400, Benjamin Kaduk wrote: >> On Tue, 26 Jun 2012, Michael Butler wrote: >> >>> As follows, in "g_disk_providergone", a NULL pointer reference?: >> >> g_disk_providergone() is new in r237518 (by ken); ken cc'd. > > Can you try the attached patch to sys/geom/geom_disk.c? This fixes the panic :-) > > Also, do you have full dmesg information for when the panic happened? > > It looks like disk_destroy() has already been called in this case, and I > suppose that's likely to happen for any of the users of the GEOM disk class > that haven't been updated with the reference count changes I made in da(4). > (i.e. all of the rest of them.) > > Let me know whether this works for you. All I have is the following leading up to my removal of the card (and the restart afterwards): Jun 26 08:57:11 toshi kernel: sdhci0-slot0: Card inserted Jun 26 08:57:11 toshi kernel: mmc0: <MMC/SD bus> on sdhci0 Jun 26 08:57:11 toshi kernel: mmc0: Probing bus Jun 26 08:57:11 toshi kernel: mmc0: SD probe: OK (OCR: 0x00ff8000) Jun 26 08:57:11 toshi kernel: mmc0: Current OCR: 0x00ff8000 Jun 26 08:57:11 toshi kernel: mmc0: Probing cards Jun 26 08:57:11 toshi kernel: mmc0: New card detected (CID 03534453553136478080d4290400a300) Jun 26 08:57:11 toshi kernel: mmc0: New card detected (CSD 400e00325b59000076b27f800a404000) Jun 26 08:57:11 toshi kernel: mmc0: Card at relative address 36832 added: Jun 26 08:57:11 toshi kernel: mmc0: card: SDHC SU16G 8.0 SN -2133579516 MFG 03/2010 by 3 SD Jun 26 08:57:11 toshi kernel: mmc0: bus: 4bit, 50MHz, high speed timing Jun 26 08:57:11 toshi kernel: mmc0: memory: 31116288 blocks, erase sector 8192 blocks Jun 26 08:57:12 toshi kernel: mmc0: setting transfer rate to 25.000MHz Jun 26 08:57:12 toshi kernel: mmcsd0: 14GB <SDHC SU16G 8.0 SN -2133579516 MFG 03/2010 by 3 SD> at mmc0 24.0MHz/4bit/65535-block Jun 26 08:57:12 toshi kernel: GEOM: new disk mmcsd0 Jun 26 08:57:12 toshi kernel: mmc0: setting bus width to 4 bits Jun 26 08:58:44 toshi syslogd: kernel boot file is /boot/kernel/kernel Jun 26 08:58:44 toshi kernel: Copyright (c) 1992-2012 The FreeBSD Project. Jun 26 08:58:44 toshi kernel: Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 Jun 26 08:58:44 toshi kernel: The Regents of the University of California. All rights reserved. Jun 26 08:58:44 toshi kernel: FreeBSD is a registered trademark of The FreeBSD Foundation.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4FEB1743.506>