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)
Fri, Jun 28, 3:55 AM
Unknown Object (File)
May 23 2024, 7:16 PM
Unknown Object (File)
Feb 7 2024, 8:27 PM
Unknown Object (File)
Dec 23 2023, 12:54 AM
Unknown Object (File)
Dec 17 2023, 11:40 AM
Unknown Object (File)
Dec 12 2023, 12:10 AM
Unknown Object (File)
Oct 22 2023, 1:37 PM
Unknown Object (File)
Sep 30 2023, 12:29 PM
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.