From owner-svn-src-projects@FreeBSD.ORG Wed Sep 1 10:07:40 2010 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CB97D1065675; Wed, 1 Sep 2010 10:07:40 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BA82B8FC23; Wed, 1 Sep 2010 10:07:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o81A7eCN058396; Wed, 1 Sep 2010 10:07:40 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o81A7efq058394; Wed, 1 Sep 2010 10:07:40 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201009011007.o81A7efq058394@svn.freebsd.org> From: Attilio Rao Date: Wed, 1 Sep 2010 10:07:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212089 - projects/sv/sys/net X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2010 10:07:40 -0000 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--; }