speedtch usbatm.h,1.4,1.5 usbatm2.c,1.13,1.14

David Woodhouse dwmw2 at infradead.org
Fri Jan 28 07:20:39 EST 2005


On Fri, 2005-01-28 at 12:11 +0000, Duncan Sands wrote:
> There is maybe a module unloading race: between the kernel thread dropping the semaphore
> and actually exiting the module could be unloaded, causing the code the kernel thread is
> executing (i.e. the return instruction) to be freed.  I don't think this can happen because
> the thread won't sleep before returning, and the module unloader waits for all threads
> to schedule before unloading.  To be confirmed.

But kernel_thread doesn't know which module it's called from, does it?

The idea behind completions was that you know the 'completer' will never
touch them after the moment they're completed. You want to leave your
kernel thread with 'complete_and_exit()' because that way you're
guaranteed that the thread will never run again after the
wait_for_completion() returns.

-- 
dwmw2




More information about the Usbatm mailing list