Page MenuHomeFreeBSD

iflib: hold the CTX lock in iflib_pseudo_register
ClosedPublic

Authored by jacob.e.keller_intel.com on Mar 15 2019, 11:53 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Mar 10, 3:37 AM
Unknown Object (File)
Feb 20 2024, 2:44 AM
Unknown Object (File)
Feb 9 2024, 11:40 PM
Unknown Object (File)
Dec 23 2023, 3:21 AM
Unknown Object (File)
Dec 17 2023, 11:55 PM
Unknown Object (File)
Dec 8 2023, 10:04 PM
Unknown Object (File)
Nov 12 2023, 12:32 PM
Unknown Object (File)
Nov 8 2023, 3:37 PM
Subscribers

Details

Summary

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.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

erj added a subscriber: erj.

Anyone else have any feedback? It makes sense to me that the attach process for pseudo devices should use the context lock like the attach process for regular devices.

This revision is now accepted and ready to land.Mar 27 2019, 5:31 PM
This revision was automatically updated to reflect the committed changes.