Page MenuHomeFreeBSD

Fix panic when using BOOTP to resolve root path.
ClosedPublic

Authored by bdragon on Mar 28 2021, 12:32 AM.
Referenced Files
Unknown Object (File)
Mar 10 2024, 10:35 PM
Unknown Object (File)
Mar 10 2024, 10:35 PM
Unknown Object (File)
Mar 10 2024, 10:35 PM
Unknown Object (File)
Mar 10 2024, 10:22 PM
Unknown Object (File)
Jan 25 2024, 2:02 AM
Unknown Object (File)
Jan 14 2024, 3:08 PM
Unknown Object (File)
Jan 9 2024, 8:52 AM
Unknown Object (File)
Dec 28 2023, 11:11 AM
Subscribers

Details

Summary

When loading a direct-boot kernel, a temporary route is being installed,
the NFS handle is acquired, and the temporary route is removed again.

This was being done inside a net epoch, but since the krpc code is written
using blocking APIs, we can't actually do that, because sleeping is not
allowed during a net epoch.

Exit and reenter the epoch so we are only in the epoch when doing the
routing table manipulation.

Fixes panic when booting my RB800 over NFS (where the kernel is loaded
using RouterBOOT directly.)

Test Plan

To test the bootp code, it is necessary to compile with
options BOOTP

as well as do the boot as a network direct boot of the kernel instead of a network boot using loader.

When netbooting *with* loader, the affected bootp code is skipped, as the NFS handle is already available.

Diff Detail

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