svn commit: r212086 - projects/sv/sys/net

Attilio Rao attilio at FreeBSD.org
Wed Sep 1 09:51:48 UTC 2010


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


More information about the svn-src-projects mailing list