Re: [PATCH v2 1/4] copy_signal cleanup: use zalloc and removeinitializations

From: Oleg Nesterov
Date: Sat Dec 05 2009 - 11:31:46 EST


On 12/04, Veaceslav Falico wrote:
>
> Use kmem_cache_zalloc() on signal creation and remove unneeded initialization
> lines in copy_signal().
>
> Signed-off-by: Veaceslav Falico <vfalico@xxxxxxxxxx>
> ---
>
> diff --git a/kernel/fork.c b/kernel/fork.c
> index 166b8c4..160477d 100644
> @@ -855,7 +844,7 @@ static int copy_signal(unsigned long clone_flags, struct task_struct *tsk)
> if (clone_flags & CLONE_THREAD)
> return 0;
>
> - sig = kmem_cache_alloc(signal_cachep, GFP_KERNEL);
> + sig = kmem_cache_zalloc(signal_cachep, GFP_KERNEL);
> ...

I think this is nice cleanup,

Acked-by: Oleg Nesterov <oleg@xxxxxxxxxx>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/