lkml.org 
[lkml]   [2002]   [Aug]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: kernel thread exit race
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,
right?

>

Nikita.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:27    [W:0.069 / U:0.348 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site