Re: Removing an SDHC card causes a kernel panic on -current

看板FB_current作者時間13年前 (2012/06/27 10:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串3/5 (看更多)
--OgqxwSJOaUobr8KG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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? 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. Thanks, Ken -- Kenneth Merry ken@FreeBSD.ORG --OgqxwSJOaUobr8KG Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="geom_disk.c.20120626.1.txt" ==== //depot/users/kenm/FreeBSD-test2/sys/geom/geom_disk.c#7 - /usr/home/kenm/perforce4/kenm/FreeBSD-test2/sys/geom/geom_disk.c ==== *** /tmp/tmp.75357.20 Tue Jun 26 20:25:44 2012 --- /usr/home/kenm/perforce4/kenm/FreeBSD-test2/sys/geom/geom_disk.c Tue Jun 26 20:25:29 2012 *************** *** 502,507 **** --- 502,515 ---- struct g_disk_softc *sc; sc = (struct g_disk_softc *)pp->geom->softc; + + /* + * If the softc is already NULL, then we've probably been through + * g_disk_destroy already; there is nothing for us to do anyway. + */ + if (sc == NULL) + return; + dp = sc->dp; if (dp->d_gone != NULL) --OgqxwSJOaUobr8KG Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" --OgqxwSJOaUobr8KG--
文章代碼(AID): #1Fwd2YYU (FB_current)
討論串 (同標題文章)
文章代碼(AID): #1Fwd2YYU (FB_current)