speedtch usbatm.h,1.4,1.5 usbatm2.c,1.13,1.14
duncan.sands at math.u-psud.fr
Fri Jan 28 07:33:48 EST 2005
On Friday 28 January 2005 13:20, David Woodhouse wrote:
> 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.
Hi David, I came to the same conclusion - see the patch I just committed! Thanks anyway :)
More information about the Usbatm