Date: Sat, 5 May 2012 11:33:48 +0000 (UTC) From: "Alexander V. Chernikov" <melifaro@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r235055 - stable/9/sys/net Message-ID: <201205051133.q45BXmF2056485@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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@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; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201205051133.q45BXmF2056485>