svn commit: r235055 - stable/9/sys/net

Alexander V. Chernikov melifaro at FreeBSD.org
Sat May 5 11:33:49 UTC 2012


Author: melifaro
Date: Sat May  5 11:33:48 2012
New Revision: 235055
URL: http://svn.freebsd.org/changeset/base/235055

Log:
  MFC r234572
  
  Do not require radix write lock to be held while dumping route table
  via sysctl(4) interface. This permits router not to stop forwarding
  packets while route table is being written to user-supplied buffer.
  
  Reported by:        Pawel Tyll <ptyll at nitronet.pl>
  Approved by:        kib(mentor)

Modified:
  stable/9/sys/net/rtsock.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/net/rtsock.c
==============================================================================
--- stable/9/sys/net/rtsock.c	Sat May  5 11:26:08 2012	(r235054)
+++ stable/9/sys/net/rtsock.c	Sat May  5 11:33:48 2012	(r235055)
@@ -1859,10 +1859,10 @@ sysctl_rtsock(SYSCTL_HANDLER_ARGS)
 		for (error = 0; error == 0 && i <= lim; i++) {
 			rnh = rt_tables_get_rnh(req->td->td_proc->p_fibnum, i);
 			if (rnh != NULL) {
-				RADIX_NODE_HEAD_LOCK(rnh); 
+				RADIX_NODE_HEAD_RLOCK(rnh); 
 			    	error = rnh->rnh_walktree(rnh,
 				    sysctl_dumpentry, &w);
-				RADIX_NODE_HEAD_UNLOCK(rnh);
+				RADIX_NODE_HEAD_RUNLOCK(rnh);
 			} else if (af != 0)
 				error = EAFNOSUPPORT;
 		}


More information about the svn-src-stable-9 mailing list