[lkml]   [2012]   [Feb]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: Module/kthread/printk question/problem
    Le jeudi 02 février 2012 à 13:22 +0400, Dmitry Antipov a écrit :
    > On 02/02/2012 01:15 PM, Eric Dumazet wrote:
    > >
    > > Try following code :
    > >
    > I already did it myself (except redundant wake_up_process(), which
    > is performed by kthread_run() anyway).

    Then its racy, unless you also changed the way your worker threads exit.

    By the time kthread_run() returns, child thread can already be gone.

    This is why I use kthread_create() : to be able to get_task_struct() so
    that task_struct cannot disappear, even if the child exits really fast :

    int worker(void *arg)
    return 0;

    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

     \ /
      Last update: 2012-02-02 11:01    [W:0.019 / U:21.244 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site