Page MenuHomeFreeBSD

device_attach: Invoke BUS_CHILD_DETACHED if an attach routine fails
ClosedPublic

Authored by jhb on Wed, Oct 16, 3:27 PM.
Tags
None
Referenced Files
F102016470: D47155.diff
Wed, Nov 6, 2:24 PM
F102012341: D47155.diff
Wed, Nov 6, 1:10 PM
Unknown Object (File)
Tue, Oct 29, 10:54 PM
Unknown Object (File)
Thu, Oct 24, 11:57 PM
Unknown Object (File)
Tue, Oct 22, 11:36 AM
Unknown Object (File)
Sun, Oct 20, 9:37 PM
Unknown Object (File)
Sun, Oct 20, 9:37 PM
Unknown Object (File)
Sun, Oct 20, 9:37 PM
Subscribers

Details

Summary

This gives the parent bus driver the opportunity to cleanup any
allocated resources, etc. left behind by a failed attach attempt.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 60042
Build 56926: arc lint + arc unit

Event Timeline

jhb requested review of this revision.Wed, Oct 16, 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.Wed, Oct 16, 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.