Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Sep 2010 10:07:40 +0000 (UTC)
From:      Attilio Rao <attilio@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r212089 - projects/sv/sys/net
Message-ID:  <201009011007.o81A7efq058394@svn.freebsd.org>

index | next in thread | raw e-mail

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--;
 }


help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201009011007.o81A7efq058394>