Page MenuHomeFreeBSD

dpaa2_mc: Check for error the first time bus_generic_detach is called
ClosedPublic

Authored by jhb on Nov 1 2024, 2:21 PM.
Tags
None
Referenced Files
F115803085: D47388.diff
Mon, Apr 28, 9:20 PM
F115779560: D47388.id145851.diff
Mon, Apr 28, 1:16 PM
Unknown Object (File)
Mar 1 2025, 11:12 PM
Unknown Object (File)
Mar 1 2025, 10:16 PM
Unknown Object (File)
Mar 1 2025, 6:59 PM
Unknown Object (File)
Mar 1 2025, 4:44 PM
Unknown Object (File)
Feb 24 2025, 8:10 PM
Unknown Object (File)
Feb 18 2025, 11:29 PM
Subscribers

Diff Detail

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

Event Timeline

jhb requested review of this revision.Nov 1 2024, 2:21 PM
jhb created this revision.
sys/dev/dpaa2/dpaa2_mc.c
286

In case of an error returned by any device_detach() all of the de-allocation below will be skipped. I'd rather log this error instead.

sys/dev/dpaa2/dpaa2_mc.c
286

But you can't just keep going. device_delete_children() is going to fail as well if bus_generic_detach() fails. That means you will still be attached, but will have your state partially destroyed, and child drivers can still call into your driver that now has mostly destroyed state and probably cause a panic. You have to stop if child drivers fail to detach.

This revision is now accepted and ready to land.Nov 2 2024, 7:32 PM