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
F163693828: D36069.id109007.diff
Sat, Jul 25, 1:08 PM
Unknown Object (File)
Tue, Jul 21, 11:30 AM
Unknown Object (File)
Mon, Jul 20, 10:59 PM
Unknown Object (File)
Tue, Jul 7, 6:54 PM
Unknown Object (File)
Sat, Jul 4, 11:13 AM
Unknown Object (File)
Fri, Jul 3, 4:37 AM
Unknown Object (File)
Fri, Jul 3, 1:07 AM
Unknown Object (File)
Wed, Jul 1, 1:18 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 Skipped
Unit
Tests Skipped

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