svn commit: r232556 - stable/8/sys/netgraph
Gleb Smirnoff
glebius at FreeBSD.org
Mon Mar 5 17:51:58 UTC 2012
Author: glebius
Date: Mon Mar 5 17:51:57 2012
New Revision: 232556
URL: http://svn.freebsd.org/changeset/base/232556
Log:
Merge r231761 from head:
In ng_bypass() add more protection against potential race
with ng_rmnode() and its followers.
Modified:
stable/8/sys/netgraph/ng_base.c
Directory Properties:
stable/8/sys/ (props changed)
Modified: stable/8/sys/netgraph/ng_base.c
==============================================================================
--- stable/8/sys/netgraph/ng_base.c Mon Mar 5 17:51:15 2012 (r232555)
+++ stable/8/sys/netgraph/ng_base.c Mon Mar 5 17:51:57 2012 (r232556)
@@ -1169,6 +1169,10 @@ ng_bypass(hook_p hook1, hook_p hook2)
return (EINVAL);
}
mtx_lock(&ng_topo_mtx);
+ if (NG_HOOK_NOT_VALID(hook1) || NG_HOOK_NOT_VALID(hook2)) {
+ mtx_unlock(&ng_topo_mtx);
+ return (EINVAL);
+ }
hook1->hk_peer->hk_peer = hook2->hk_peer;
hook2->hk_peer->hk_peer = hook1->hk_peer;
More information about the svn-src-stable-8
mailing list