Page MenuHomeFreeBSD

fork1: Initialize p_ktr earlier
Needs ReviewPublic

Authored by des on Sat, Dec 13, 10:36 PM.

Details

Reviewers
kib
Summary

We check that p_ktr is empty in proc_dtor(), so we must take care to
initialize it before we do anything that can lead to the failure path.

PR: 291470
MFC after: 1 week

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 69238
Build 66121: arc lint + arc unit

Event Timeline

des requested review of this revision.Sat, Dec 13, 10:36 PM

IMO it would be more proper to move the initialization into proc_init().

In D54215#1238587, @kib wrote:

IMO it would be more proper to move the initialization into proc_init().

And then proc_dtor could assert that p->p_ktr is empty unconditionally, not only when there is a thread owned by the process.