public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: + task_struct-cleanup-make-binfmt-module-get-and-put-per-signal_struct .patch added to -mm tree
       [not found] <200907222023.n6MKNcgH026779@imap1.linux-foundation.org>
@ 2009-07-22 21:38 ` Oleg Nesterov
  0 siblings, 0 replies; only message in thread
From: Oleg Nesterov @ 2009-07-22 21:38 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, h-shimamoto, roland

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.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-07-22 21:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <200907222023.n6MKNcgH026779@imap1.linux-foundation.org>
2009-07-22 21:38 ` + task_struct-cleanup-make-binfmt-module-get-and-put-per-signal_struct .patch added to -mm tree Oleg Nesterov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox