Date: Sat, 22 Apr 2006 23:28:19 GMT From: John Birrell <jb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 95901 for review Message-ID: <200604222328.k3MNSJh5014838@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=95901 Change 95901 by jb@jb_freebsd2 on 2006/04/22 23:27:57 If the module failed to unload because it is still busy, don't try to deregister the event handler the next time around. Doing that causes a panic. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_modevent.c#4 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_modevent.c#4 (text+ko) ==== @@ -40,11 +40,18 @@ break; case MOD_UNLOAD: - /* De-register the device cloning event handler. */ - EVENTHANDLER_DEREGISTER(dev_clone, eh_tag); + /* + * Check if there is still an event handler callback + * registered. + */ + if (eh_tag != 0) { + /* De-register the device cloning event handler. */ + EVENTHANDLER_DEREGISTER(dev_clone, eh_tag); + eh_tag = 0; - /* Stop device cloning. */ - clone_cleanup(&dtrace_clones); + /* Stop device cloning. */ + clone_cleanup(&dtrace_clones); + } error = dtrace_unload(); break;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200604222328.k3MNSJh5014838>