diff options
author | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2015-09-23 12:50:07 +0000 |
---|---|---|
committer | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2015-09-23 12:50:07 +0000 |
commit | 12d2f7b84278b0d10a930ab1da7173d65257f519 (patch) | |
tree | 986fef45fa2123e621dc08093917d04ac3c07d0b /distrib | |
parent | 2e3251edfe85b798c44bb25d31a9eb3bc5b7f8e7 (diff) |
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
Diffstat (limited to 'distrib')
0 files changed, 0 insertions, 0 deletions