From: Al Viro Date: Tue, 22 Apr 2008 09:11:59 +0000 (-0400) Subject: [PATCH] sanitize handling of shared descriptor tables in failing execve() X-Git-Tag: v2.6.26-rc1~1051^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fd8328be874f4190a811c58cd4778ec2c74d2c05;p=pandora-kernel.git [PATCH] sanitize handling of shared descriptor tables in failing execve() * unshare_files() can fail; doing it after irreversible actions is wrong and de_thread() is certainly irreversible. * since we do it unconditionally anyway, we might as well do it in do_execve() and save ourselves the PITA in binfmt handlers, etc. * while we are at it, binfmt_som actually leaked files_struct on failure. As a side benefit, unshare_files(), put_files_struct() and reset_files_struct() become unexported. Signed-off-by: Al Viro --- Reading git-diff-tree failed