fork1() does not behave if called under Giant. For instance, it might need to call thread_suspend_check() which explicitly verifies that Giant is not locked. On the other hand, the kthread KPI is often called from SYSINIT() which is still Giant-locked. Handle this by dropping Giant in kthread_add() and kproc_create().
See for instance https://people.freebsd.org/~pho/stress/log/log0485.txt
Style changes will be a separate commit.