Re: [Patch 0/9] Fix resource leaks for exec related stuffs

Al Viro
2008-05-10T20:47:40Z

On Thu, May 08, 2008 at 09:52:25PM +0800, WANG Cong wrote:
> This patchset contains various fixes for fs/binfmt_*.c, fs/{exec, compat}.c.
> Most of them are aimed to fix resource leaks in failure path. Others
> are bug fixes in failure path.
>
> All patches are tested on UML, except [5/9] and [6/9], since I don't have
> the desired environment to test them. It should be OK since [4/9] is the
> similar fix.

3/9 and 8/9 are OK, the rest is either not needed or broken (e.g. 4/9
ends up with double fput() in case of failure in prepare_binfmt(), etc.)

I've applied "fs/binfmt_elf.c: fix a wrong free", slightly simple fix
for lead covered by 3/9, and 8/9 as-is; all in vfs-2.6.git#vfs-2.6.25.