]> Git Repo - linux.git/commit
kexec: prevent double free on image allocation failure
authorSasha Levin <[email protected]>
Thu, 28 Feb 2013 01:03:28 +0000 (17:03 -0800)
committerLinus Torvalds <[email protected]>
Thu, 28 Feb 2013 03:10:12 +0000 (19:10 -0800)
commitfe88f2ee33731f0934e8fb26f762b6715e43ff6f
treeb6e8af3812192ca5d8a60c51faaa9a025dbe7a5e
parent0d0bf6674136eb861b37213160b16388cfc1926d
kexec: prevent double free on image allocation failure

If kimage_normal_alloc() fails to initialize an allocated kimage, it will
free the image but would still set 'rimage', as a result kexec_load will
try to free it again.

This would explode as part of the freeing process is accessing internal
members which point to uninitialized memory.

Signed-off-by: Sasha Levin <[email protected]>
Cc: "Eric W. Biederman" <[email protected]>
Cc: Zhang Yanfei <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
kernel/kexec.c
This page took 0.052202 seconds and 4 git commands to generate.