The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: "Mika Penttilä" <mika.penttila@kolumbus.fi>
To: Zwane Mwaikambo <zwane@linuxpower.ca>
Cc: Ingo Molnar <mingo@elte.hu>,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	Manfred Spraul <manfred@colorfullife.com>,
	William Lee Irwin III <wli@holomorphy.com>
Subject: Re: [RFC][PATCH][2.5] Possible race in wait_task_zombie and finish_task_switch
Date: Sun, 25 May 2003 14:00:24 +0300	[thread overview]
Message-ID: <3ED0A248.10308@kolumbus.fi> (raw)
In-Reply-To: Pine.LNX.4.50.0305250625050.19617-100000@montezuma.mastecende.com



Zwane Mwaikambo wrote:

>On Sun, 25 May 2003, Ingo Molnar wrote:
>
>  
>
>>On Sun, 25 May 2003, Zwane Mwaikambo wrote:
>>
>>    
>>
>>>	if (prev->state & (TASK_DEAD | TASK_ZOMBIE))
>>>		put_task_struct(prev);
>>>      
>>>
>>we initialize tsk->usage with 2 in fork() - are you sure the removal of
>>the above code will not result in a memory leak?
>>    
>>
>
>Isn't current the forked task? Also we initialise the forked task's state 
>to TASK_UNINTERRUPTIBLE.
>
>	Zwane
>  
>

The put_task_struct() above is for dropping our own reference after we 
exit. The other reference gets dropped by who is waiting for us.

--Mika



  reply	other threads:[~2003-05-25 10:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-25 10:11 [RFC][PATCH][2.5] Possible race in wait_task_zombie and finish_task_switch Zwane Mwaikambo
2003-05-25 10:27 ` Ingo Molnar
2003-05-25 10:29   ` Zwane Mwaikambo
2003-05-25 11:00     ` Mika Penttilä [this message]
2003-05-25 11:23       ` Manfred Spraul
2003-05-25 11:29         ` Zwane Mwaikambo
2003-05-25 20:31         ` William Lee Irwin III

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=3ED0A248.10308@kolumbus.fi \
    --to=mika.penttila@kolumbus.fi \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manfred@colorfullife.com \
    --cc=mingo@elte.hu \
    --cc=wli@holomorphy.com \
    --cc=zwane@linuxpower.ca \
    /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