summaryrefslogtreecommitdiff
path: root/share/tmac
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2016-06-22 06:32:33 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2016-06-22 06:32:33 +0000
commit67965e113b32181663309143032281ad16a0943b (patch)
treea82c5a48b42f663f3bb7f5852084b70f90c59ad2 /share/tmac
parent6b7119be11c201a22244f663a13af2c7995825ba (diff)
rework art_walk so it will behave in an mpsafe world.
art_walk now explicitly takes the same lock used to serialise change made via rtable_insert and _delete, so it can safely adjust the refcnts on tables while it recurses into them. they need to still exist when returning out of the recursion. it uses srps to access nodes and drops the lock before calling the callback function. this is because some callbacks sleep (eg, copyout in the sysctl code that dumps an rtable to userland), which you shouldnt hold a lock accross. other callbacks attempt to modify the rtable (eg, marking routes as down when then interface theyre on goes down), which tries to take the lock again, which probably wont work in the future. ok jmatthew@ mpi@
Diffstat (limited to 'share/tmac')
0 files changed, 0 insertions, 0 deletions