HomeFreeBSD

iflib: hold the CTX lock in iflib_pseudo_register

Description

iflib: hold the CTX lock in iflib_pseudo_register

From Jake:
The iflib_device_register function takes the CTX lock before calling
IFDI_ATTACH_PRE, and releases it upon finishing the registration.

Mirror this process in iflib_pseudo_register, so that we always hold the
CTX lock during the attach process when registering a pseudo interface
or a regular interface.

This was caught by code inspection while attempting to analyze where the
CTX lock was held.

Submitted by: Jacob Keller <jacob.e.keller@intel.com>
Reviewed by: shurd@, erj@
MFC after: 1 week
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D19604

Details

Committed
erjMar 28 2019, 8:43 PM
Differential Revision
D19604: iflib: hold the CTX lock in iflib_pseudo_register
Parents
rS345656: Do not map small IOCTL buffers to KVA, but copy.
Branches
Unknown
Tags
Unknown