Page MenuHomeFreeBSD

device_attach: Invoke BUS_CHILD_DETACHED if an attach routine fails
ClosedPublic

Authored by jhb on Oct 16 2024, 3:27 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Mar 10, 9:57 PM
Unknown Object (File)
Sat, Feb 22, 2:32 PM
Unknown Object (File)
Tue, Feb 11, 3:59 PM
Unknown Object (File)
Feb 3 2025, 4:21 PM
Unknown Object (File)
Jan 26 2025, 11:29 PM
Unknown Object (File)
Jan 25 2025, 11:05 PM
Unknown Object (File)
Jan 25 2025, 10:09 PM
Unknown Object (File)
Jan 22 2025, 2:08 PM
Subscribers

Diff Detail

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

Event Timeline

jhb requested review of this revision.Oct 16 2024, 3:27 PM

So long as the parent doesn't call the child's detach, this is great. I'm pretty sure this is the case, but we need to make sure there's no double freeing introduced

This revision is now accepted and ready to land.Oct 16 2024, 3:34 PM

I don't think the parent can interfere here as DEVICE_ATTACH calls the child method directly without giving the parent driver a chance to interpose.