]> 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, 25 Oct 2012 01:15:08 +0000 (12:15 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 2 Nov 2012 05:00:57 +0000 (16:00 +1100)
commit5f486bdb31d000b8daa2075aff15dbb1d0f97baf
tree8a2ed3f7c87972e0cd4f7c9661b194a6175f7cb5
parent3d36cae9578bb6b194cceaa0112d986d1279523a
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