svn commit: r212089 - projects/sv/sys/net
Attilio Rao
attilio at FreeBSD.org
Wed Sep 1 10:07:40 UTC 2010
Author: attilio
Date: Wed Sep 1 10:07:40 2010
New Revision: 212089
URL: http://svn.freebsd.org/changeset/base/212089
Log:
- Tweak some comments
- Move down the 'dumping' bump in order to match what doadump() does
Modified:
projects/sv/sys/net/netdump_client.c
Modified: projects/sv/sys/net/netdump_client.c
==============================================================================
--- projects/sv/sys/net/netdump_client.c Wed Sep 1 09:59:45 2010 (r212088)
+++ projects/sv/sys/net/netdump_client.c Wed Sep 1 10:07:40 2010 (r212089)
@@ -1175,17 +1175,18 @@ netdump_trigger(void *arg, int howto)
printf("netdump_trigger: Can't netdump; no client IP given\n");
return;
}
- dumping++;
/*
- * netdump is invoked as a shutdown handler instead of as
- * a real dumpdev dump routine. (networks are shut down
- * before dumpsys() gets called.) make sure the dump context
- * is set so a debugger can find the stack trace.
+ * netdump is invoked as a pre-sync handler instead of as
+ * a real dumpdev dump routine (that is because shutdown handlers
+ * run as post-sync handlers, earlier than dumping routines
+ * taking place, and thus network and devices may not be further
+ * available).
+ * Make sure, artificially, the dump context is set so a debugger
+ * can find the stack trace.
*/
savectx(&dumppcb);
-
- /***** Beyond this point, don't return: goto trig_abort *****/
+ dumping++;
bzero(broken_state, sizeof(broken_state));
error = nd_nic->if_netdump->break_lock(nd_nic, &broke_lock, broken_state, sizeof(broken_state));
@@ -1250,8 +1251,6 @@ netdump_trigger(void *arg, int howto)
trig_abort:
if (old_if_input)
nd_nic->if_input = old_if_input;
- /* Even if we broke the lock, this seems like the most sane thing to
- * do */
nd_nic->if_netdump->release_lock(nd_nic);
dumping--;
}
More information about the svn-src-projects
mailing list