]> git.karo-electronics.de Git - karo-tx-linux.git/commit
binfmt_elf: fix corner case kfree of uninitialized data
authorAlan Cox <alan@linux.intel.com>
Thu, 29 Nov 2012 03:18:40 +0000 (14:18 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 5 Dec 2012 05:23:37 +0000 (16:23 +1100)
commit2197f5cbabf162842747a67f1421a2febcbb3718
tree14e6329eea8bab0d9d69c3ce6fdf392e76141ff1
parenta921b1d793a5b34bfd5bc13a38f42562f58bf280
binfmt_elf: fix corner case kfree of uninitialized data

If elf_core_dump() is called and fill_note_info() fails in the kmalloc()
then it returns 0 but has not yet initialised all the needed fields.  As a
result we do a kfree(randomness) after correctly skipping the thread data.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/binfmt_elf.c