Page MenuHomeFreeBSD

[powerpc] Fix kernel panic when using "options BOOTP_NFSROOT"
ClosedPublic

Authored by leandro.lupori_gmail.com on Aug 8 2018, 6:38 PM.

Details

Summary

On PowerPC (and possibly other architectures), that doesn't use EARLY_AP_STARTUP, the config task queue may be used initialized.
This was observed while trying to mount the root fs from NFS, as reported here: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230168.

This patch has 2 main changes:
1- Perform a basic initialization of qgroup_config, similar to what is done in taskqgroup_adjust, but simpler. This makes qgroup_config ready to be used during NFS root mount.

2- When EARLY_AP_STARTUP is not used, call inm_init() and in6m_init() right before SI_SUB_ROOT_CONF, because bootp needs to send multicast packages to request an IP.

Test Plan

This patch was tested both on QEMU (pseries) as well as on real POWER8 hardware. Those systems were able to mount the root filesystem from NFS without issues.

It would be nice to test this on x86 as well, to see if the early qgroup_config initialization doesn't cause any issues with it.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

mmacy accepted this revision.Aug 8 2018, 7:31 PM

LGTM

This revision is now accepted and ready to land.Aug 8 2018, 7:31 PM
jhibbits accepted this revision.Aug 8 2018, 8:00 PM

Approved. A cleaner solution might be to add another SI_SUB_ node, or reuse an existing one for all cases. But this unblocks us, and is sufficient. SI_SUB_INIT_IF looks like a good one (no need to do it now).

sbruno accepted this revision.Aug 8 2018, 8:24 PM

Approved. A cleaner solution might be to add another SI_SUB_ node, or reuse an existing one for all cases. But this unblocks us, and is sufficient. SI_SUB_INIT_IF looks like a good one (no need to do it now).

Ok, so I'll just commit it as it is right now, to unblock others, then we can refine it later.

This revision was automatically updated to reflect the committed changes.