Page MenuHomeFreeBSD

thread_create(): call cpu_copy_thread() after td_pflags is zeroed
ClosedPublic

Authored by kib on Aug 8 2022, 12:10 PM.
Tags
None
Referenced Files
F150182795: D36069.id109007.diff
Mon, Mar 30, 2:26 AM
Unknown Object (File)
Fri, Mar 27, 11:40 AM
Unknown Object (File)
Fri, Mar 27, 4:19 AM
Unknown Object (File)
Mon, Mar 23, 11:07 PM
Unknown Object (File)
Tue, Mar 17, 7:11 AM
Unknown Object (File)
Thu, Mar 5, 10:35 AM
Unknown Object (File)
Tue, Mar 3, 8:53 AM
Unknown Object (File)
Tue, Mar 3, 1:01 AM
Subscribers

Details

Summary
By calling the function too early we might still have the td_pflags
value cached from the previous struct thread use. cpu_copy_thread()
depends on correct value for TDP_KTHREAD at least on x86.

Reported and tested by:    pho

Diff Detail

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

Event Timeline

kib requested review of this revision.Aug 8 2022, 12:10 PM

I think linux_clone_thread() needs the same change?

Handle linuxolator use of cpu_copy_thread() as well

This revision is now accepted and ready to land.Aug 8 2022, 3:52 PM