ifnet: Make blocking operation in if_addrheads iteration MPSAFE
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Wed, 18 Feb 2015 13:01:15 +0000 (21:01 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Mon, 2 Mar 2015 05:29:15 +0000 (13:29 +0800)
commit9a74b5922bf37459c2ab956c7ddb8cc1a54c933f
tree28c2f3a10b2af674f56fd3086eb58db62561eb73
parenta53014fba63a9a2ba6b8eec65b3ad468dcfbc148
ifnet: Make blocking operation in if_addrheads iteration MPSAFE

Two methods are used:
- Dispatch blocking operation in if_addrheads iteration to netisr0
  to run for functions which do not copy data into user space.
- Use ifaddr marker to make sure that the ifaddr list is not broken
  if the ifaddr list is changed during the blocking operation.  And
  reference the ifaddr being used so it will not be destroyed during
  the blocking operation.
sys/emulation/linux/linux_ioctl.c
sys/net/if.c
sys/net/if_var.h
sys/net/pf/pf_if.c
sys/net/rtsock.c
sys/netgraph/eiface/ng_eiface.c
sys/netgraph7/eiface/ng_eiface.c
test/ifconf/Makefile [new file with mode: 0644]
test/ifconf/ifconf.c [new file with mode: 0644]