mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arjan van de Ven <arjan@infradead.org>
To: Samer Sarhan <samersarhan@gmail.com>
Cc: linux-kernel@vger.kernel.org, Ahmed Mohamed Tarek <ahmadtarek@gmail.com>
Subject: Re: Changing thread_info->task, does it harm?
Date: Sun, 14 Aug 2005 14:52:24 +0200	[thread overview]
Message-ID: <1124023944.7041.2.camel@laptopd505.fenrus.org> (raw)
In-Reply-To: <f03ab5ae05081405411da7f70@mail.gmail.com>

On Sun, 2005-08-14 at 15:41 +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;
> ...


why ?


> well... is it dangerous to change what current macro points to through
> changing thread_info->task?

it most likely is.

1) Why do you think you need to do this ??
2) What are you trying to solve?
3) What is the URL to the sourcecode of your module ?



  reply	other threads:[~2005-08-14 12:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-14 12:41 Samer Sarhan
2005-08-14 12:52 ` Arjan van de Ven [this message]
2005-08-14 12:56 ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1124023944.7041.2.camel@laptopd505.fenrus.org \
    --to=arjan@infradead.org \
    --cc=ahmadtarek@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=samersarhan@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®