[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20090722213807.GA4583@redhat.com>
Date:	Wed, 22 Jul 2009 23:38:07 +0200
From:	Oleg Nesterov <oleg@...hat.com>
To:	akpm@...ux-foundation.org
Cc:	linux-kernel@...r.kernel.org, h-shimamoto@...jp.nec.com,
	roland@...hat.com
Subject: Re: +
	task_struct-cleanup-make-binfmt-module-get-and-put-per-signal_struct
	.patch added to -mm tree
On 07/22, Andrew Morton wrote:
>
> Subject: task_struct cleanup: make binfmt module get and put per signal_struct
> From: Hiroshi Shimamoto <h-shimamoto@...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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
Powered by blists - more mailing lists
 
