public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Fabiano Ramos <ramos_fabiano@yahoo.com.br>
To: linux-kernel@vger.kernel.org
Subject: get_task_struct()
Date: Sat, 17 Apr 2004 12:46:40 -0300	[thread overview]
Message-ID: <1082216800.1447.26.camel@slack.domain.invalid> (raw)

Dear All,

Inside sys_ptrace, the function get_task_struct is invoked after
retrieving the child's task srtuct pointer. Why is it done? I have
tracked down the code and noticed that it is in fact an increment
on the (page?) counter. Can you help me understand it? 

Is it necessary to call free_task_struct whenever its get counterpart
is called?


** arch/i386/kernel/ptrace.c
>  read_lock(&tasklist_lock);
>  child = find_task_by_pid(pid);
>  if (child)
>              get_task_struct(child);
>  read_unlock(&tasklist_lock);

Thanks in advance,
Fabiano


             reply	other threads:[~2004-04-17 15:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-17 15:46 Fabiano Ramos [this message]
2004-04-17 16:19 ` get_task_struct() Robert Love

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=1082216800.1447.26.camel@slack.domain.invalid \
    --to=ramos_fabiano@yahoo.com.br \
    --cc=linux-kernel@vger.kernel.org \
    /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