Page MenuHomeFreeBSD

Set TDP_KTHREAD before calling cpu_fork() and cpu_copy_thread().
ClosedPublic

Authored by jhb on Mar 10 2021, 10:13 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Mar 23, 1:51 PM
Unknown Object (File)
Mar 16 2024, 10:11 PM
Unknown Object (File)
Mar 16 2024, 10:11 PM
Unknown Object (File)
Mar 16 2024, 10:11 PM
Unknown Object (File)
Mar 16 2024, 10:11 PM
Unknown Object (File)
Mar 16 2024, 9:59 PM
Unknown Object (File)
Mar 12 2024, 4:54 AM
Unknown Object (File)
Feb 11 2024, 5:37 PM
Subscribers

Details

Summary

This permits these routines to use special logic for initializing MD
kthread state.

For the kproc case, this required moving the logic to set these flags
from kproc_create() into do_fork().

Diff Detail

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

Event Timeline

sys/kern/kern_fork.c
509

Note that code for DROPSIG_CAUGHT above is accurate to lock p2 ps_mtx around p_sigacts manipulations (even if only for asserts). I think it is better to be consistent both by style and formal requirements and lock ps_mtx if (FR2_DROPSIG_CAUGHT | FR2_KPROC).

jhb marked an inline comment as done.Mar 11 2021, 10:36 PM
This revision is now accepted and ready to land.Mar 12 2021, 12:46 PM