From: Christoph Hellwig <hch@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 13:56:34 +0100 [thread overview]
Message-ID: <20050814125634.GA18884@infradead.org> (raw)
In-Reply-To: <f03ab5ae05081405411da7f70@mail.gmail.com>
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.
prev parent reply other threads:[~2005-08-14 12:56 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
2005-08-14 12:56 ` Christoph Hellwig [this message]
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=20050814125634.GA18884@infradead.org \
--to=hch@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®