HomeFreeBSD

Check for errors when detaching children first, not last

Description

Check for errors when detaching children first, not last

These detach routines in these drivers all ended with 'return
(bus_generic_detach())' meaning that if any child device failed to
detach, the parent driver was left in a mostly destroyed state, but
still marked attached. Instead, bus drivers should detach child
drivers first and return errors before destroying driver state in the
parent.

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D47387

(cherry picked from commit d412c07617eb35435668b024bc2cecda05f57f1f)

Details

Provenance
jhbAuthored on Nov 5 2024, 1:30 AM
Reviewer
imp
Differential Revision
D47387: Check for errors when detaching children first, not last
Parents
rG38ed49b0f927: sound: Use bus_child_deleted methods to free ivars for children
Branches
Unknown
Tags
Unknown