Re: kernel thread exit race

From: Nikita Danilov (Nikita@Namesys.COM)
Date: Wed Aug 07 2002 - 05:05:22 EST

Alan Cox writes:
> On Wed, 2002-08-07 at 10:22, Nikita Danilov wrote:
> > Hello,
> >
> > what is the politically correct way to exit from a kernel thread daemon
> > without module unload races?
> You probably want to use completions. There is a function in the kernel
> core "complete_and_exit" which does both the complete() and then the
> exit() so that after complete finishes the task will not re-enter
> modulespace and risk an unload race

Ah I see, thank you and Russell. But this depends on no architecture
ever accessing spinlock data after letting waiters to run, otherwise
there still is (tiny) window for race at the end of complete() call,


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Wed Aug 07 2002 - 22:00:35 EST