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)
Thu, Nov 14, 2:58 PM
Unknown Object (File)
Tue, Nov 5, 5:43 AM
Unknown Object (File)
Sat, Nov 2, 5:40 AM
Unknown Object (File)
Sat, Nov 2, 5:40 AM
Unknown Object (File)
Sat, Nov 2, 5:40 AM
Unknown Object (File)
Sat, Nov 2, 5:18 AM
Unknown Object (File)
Fri, Nov 1, 3:55 PM
Unknown Object (File)
Oct 30 2024, 3:31 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.