lkml.org 
[lkml]   [2005]   [Aug]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Changing thread_info->task, does it harm?
On Sun, Aug 14, 2005 at 03:41:49PM +0300, Samer Sarhan wrote:
> Hi,
> I had a design problem of a Linux module (Linux 2.6.11) that lead me to do this:
>
> int work_fn(void* data);
> task_t my_task;
> task_t* kthread = kthread_create(work_fn, NULL, "Task 1");
> // assume kthread create was successfully...
> my_task = *kthread;
> // change what current maceo points to...
> kthread->thread_info->task = &my_task;
> ...
> ...
> wake_up_process(&my_task);
> ...
> ..
>
> well... is it dangerous to change what current macro points to through
> changing thread_info->task?

Yes. It's totally broken.

-
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-08-14 15:00    [W:3.210 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site