From b2c903b8790467ae400f6992ac01bc8913b49e19 Mon Sep 17 00:00:00 2001 From: Oleg Nesterov Date: Tue, 16 Oct 2007 23:27:22 -0700 Subject: [PATCH] exec: simplify the new ->sighand allocation de_thread() pre-allocates newsighand to make sure that exec() can't fail after killing all sub-threads. Imho, this buys nothing, but complicates the code: - this is (mostly) needed to handle CLONE_SIGHAND without CLONE_THREAD tasks, this is very unlikely (if ever used) case - unless we already have some serious problems, GFP_KERNEL allocation should not fail - ENOMEM still can happen after de_thread(), ->sighand is not the last object we have to allocate Change the code to allocate the new ->sighand on demand. Signed-off-by: Oleg Nesterov Cc: Roland McGrath Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-format-patch failed