public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: akpm@linux-foundation.org
Cc: linux-kernel@vger.kernel.org, h-shimamoto@ct.jp.nec.com,
	roland@redhat.com
Subject: Re: + task_struct-cleanup-make-binfmt-module-get-and-put-per-signal_struct .patch added to -mm tree
Date: Wed, 22 Jul 2009 23:38:07 +0200	[thread overview]
Message-ID: <20090722213807.GA4583@redhat.com> (raw)
In-Reply-To: <200907222023.n6MKNcgH026779@imap1.linux-foundation.org>

On 07/22, Andrew Morton wrote:
>
> Subject: task_struct cleanup: make binfmt module get and put per signal_struct
> From: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
>
> The binfmt is a member of signal_struct, so it can be handled per
> signal_struct instead of task_struct.

Both patches look good to me. But perhaps the changelog for this patch
should document the user-visible change,

> @@ -888,6 +892,8 @@ void __cleanup_signal(struct signal_stru
>  {
>  	thread_group_cputime_free(sig);
>  	tty_kref_put(sig->tty);
> +	if (sig->binfmt)
> +		module_put(sig->binfmt->module);
>  	kmem_cache_free(signal_cachep, sig);
>  }

This means that a zombie task still holds a reference to ->binfmt, until
it is reaped.


Or. we can do module_put() earlier, in do_exit() under "if (group_dead)".
(in that case we should also modify copy_process() path).

Oleg.


           reply	other threads:[~2009-07-22 21:41 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <200907222023.n6MKNcgH026779@imap1.linux-foundation.org>]

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=20090722213807.GA4583@redhat.com \
    --to=oleg@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=h-shimamoto@ct.jp.nec.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=roland@redhat.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