Page MenuHomeFreeBSD

hdaa: Don't hold a mutex while creating child devices
ClosedPublic

Authored by jhb on Thu, Mar 6, 10:07 PM.
Tags
None
Referenced Files
F112606551: D49272.diff
Thu, Mar 20, 10:52 AM
Unknown Object (File)
Wed, Mar 12, 5:52 PM
Unknown Object (File)
Mon, Mar 10, 10:33 PM
Unknown Object (File)
Mon, Mar 10, 9:52 PM
Unknown Object (File)
Mon, Mar 10, 6:27 PM
Unknown Object (File)
Sun, Mar 9, 12:17 PM
Unknown Object (File)
Sat, Mar 8, 8:10 AM
Unknown Object (File)
Sat, Mar 8, 8:05 AM
Subscribers
None

Details

Summary

The lock is already not held while deleting child devices, and the
bus_topo_lock is already held when child devices are created.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jhb requested review of this revision.Thu, Mar 6, 10:07 PM
jhb created this revision.

I can't see a reason to hold the lock in the function, it just calls device_add_child in a loop and is already under the bus_topo_lock. This also does clear up the witness warning I was getting on boot on my X1 Carbon after Warner's original change to use M_WAITOK.

This revision is now accepted and ready to land.Thu, Mar 6, 10:25 PM
imp requested changes to this revision.Thu, Mar 6, 10:28 PM
This revision now requires changes to proceed.Thu, Mar 6, 10:28 PM

Hmm, did you mean to approve this or request changes?

silly button pushing nisse have gotten into my phone... Didn't mean to request changes.

This revision is now accepted and ready to land.Sat, Mar 8, 4:48 PM