From owner-svn-src-projects@FreeBSD.ORG Wed Sep 1 09:51:48 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 4FE4A1065679; Wed, 1 Sep 2010 09:51:48 +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 3EB6C8FC0A; Wed, 1 Sep 2010 09:51:48 +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 o819pm7v057952; Wed, 1 Sep 2010 09:51:48 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o819pmT2057950; Wed, 1 Sep 2010 09:51:48 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201009010951.o819pmT2057950@svn.freebsd.org> From: Attilio Rao Date: Wed, 1 Sep 2010 09:51:48 +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: r212086 - 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 09:51:48 -0000 Author: attilio Date: Wed Sep 1 09:51:47 2010 New Revision: 212086 URL: http://svn.freebsd.org/changeset/base/212086 Log: It is not necessary to disable interrupts here neither useful: 1) The code path is quite heavy and disabling indiscriminately interrupts for that long is not a good approach 2) The context (callers) may provide such type of protection, if anything, because they know more about the surrounding 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:47:56 2010 (r212085) +++ projects/sv/sys/net/netdump_client.c Wed Sep 1 09:51:47 2010 (r212086) @@ -1198,9 +1198,6 @@ netdump_trigger(void *arg, int howto) /* At this point, we should 'own' the driver lock */ - /* We don't want interrupts potentially messing with our dump process */ - critical_enter(); - /* Make the card use *our* receive callback */ old_if_input = nd_nic->if_input; nd_nic->if_input = netdump_pkt_in; @@ -1255,7 +1252,6 @@ abort: cleanup: if (old_if_input) nd_nic->if_input = old_if_input; - critical_exit(); /* Even if we broke the lock, this seems like the most sane thing to * do */ nd_nic->if_netdump->release_lock(nd_nic);