CVSROOT: /cvs Module name: src Changes by: mi...@cvs.openbsd.org 2015/09/23 06:50:06
Modified files: sys/net : if_trunk.c Log message: Serialize trunk changes with input handler insertion and removal. This moves around calls to if_ih_insert and if_ih_remove to ensure that we either have completed port initialization or are going to tear the port configuration down and don't want any input processes to get hold of the port. When trunk_port_destroy is called from the ioctl this would wait for all input processes to finish and release their references to be able to disestablish the input handler and ensure full control of the port. When switching trunkproto it is required for the ioctl context to be able to touch all trunk ports and the protocol (tr_psc). The easiest way do this is to disestablish all input handlers (while making sure they all complete) and then reestablish them after the trunk reconfiguration is completed. This avoids getting trunk a separate locking protocol of its own. ok mpi, suggested by and ok dlg