When kthread_create spawns a kernel thread, it doesnt mark it with the flag P_KTHREADP which at least according to its description, should be used to mark kernel threads. Fix: This is submitted through the web interface and probably wont apply correctly, but it shows how to fix it. How-To-Repeat: Spawn a kthread and check for P_KTHREADP in p->p_flag.
Responsible Changed From-To: freebsd-bugs->jhb John has already made a similar change in HEAD, but the change doesn't seem to have been merged onto RELENG_4.
On 09-Jan-02 sheldonh@FreeBSD.org wrote: > Synopsis: kthread_create doesnt mark kthreads as kthreads. > > Responsible-Changed-From-To: freebsd-bugs->jhb > Responsible-Changed-By: sheldonh > Responsible-Changed-When: Wed Jan 9 06:30:03 PST 2002 > Responsible-Changed-Why: > John has already made a similar change in HEAD, but the change doesn't > seem to have been merged onto RELENG_4. > > http://www.FreeBSD.org/cgi/query-pr.cgi?pr=33124 This is actually kind of bogus. Nobody uses this flag except aio, and aio just sets the flag, no code actually checks it. P_KTHREAD is a new flag in -current used in a few places. Unless the submitter has code that actually checks P_KTHREADP and needs it set for some reason, I would rather see the flag killed. One thing that might be nice to MFC is changing aio to use kthread_create rather than using its own home-rolled version. -- John Baldwin <jhb@FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/
State Changed From-To: open->closed Fixed in 5.x and later and not going to have time to backport this to 4.x.