Page MenuHomeFreeBSD

stand/uboot: setup archsw before probing devices
ClosedPublic

Authored by aja_semihalf.com on Jun 30 2022, 7:15 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Oct 11, 4:52 AM
Unknown Object (File)
Sep 13 2025, 2:13 AM
Unknown Object (File)
Sep 6 2025, 12:28 PM
Unknown Object (File)
Aug 26 2025, 4:35 AM
Unknown Object (File)
Aug 2 2025, 4:27 PM
Unknown Object (File)
Jul 12 2025, 2:40 AM
Unknown Object (File)
Jun 29 2025, 4:12 PM
Unknown Object (File)
Jun 24 2025, 2:19 AM
Subscribers

Details

Summary

In some cases ubldr would try to mount a disk device before
the archsw struct was filled with functions pointers.
This would result in a NULL pointer derefrence of the arch_getdev field.
Fix that filling the archsw functions earlier.
Note that this matches the EFI behavoiur.

Diff Detail

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

Event Timeline

Haven't chased down all the ways this scenario might happen, but this change won't hurt and could help.

This revision is now accepted and ready to land.Jun 30 2022, 4:39 PM
mw added inline comments.
stand/uboot/main.c
489

This is an unrelated change, and imo should be dropped when committting. Otherwise, LGTM.

This revision was automatically updated to reflect the committed changes.