kthread_exit and giant

Petri Helenius pete at he.iki.fi
Mon May 5 13:46:06 PDT 2003


> 
> The kthread is supposed to acquire Giant before calling kthread_exit().
> Actually, my guess is that the ar kthread needs to acquire Giant for the
> lifetime of the thread.  I have an untested patch locally:
> 
I thought the lifetime of the thread is the duration of the rebuild process? Which
can be minutes to hours. Locking giant for that kind of time does not sound
right, so locking it just before thread exit sounds like the right thing to do, 
as long as the code othervise keeps critical sections locked.

Pete



More information about the freebsd-current mailing list