Re: [PATCH] kexec: prevent double free on image allocation failure

2013-02-21 Thread Zhang Yanfei
于 2013年02月22日 11:41, Sasha Levin 写道: > On 02/21/2013 09:46 PM, Zhang Yanfei wrote: >> 于 2013年02月22日 09:55, Eric W. Biederman 写道: >>> Sasha Levin writes: >>> If kimage_normal_alloc() fails to initialize an allocated kimage, it will free the image but would still set 'rimage', as a r

Re: [PATCH] kexec: prevent double free on image allocation failure

2013-02-21 Thread Sasha Levin
On 02/21/2013 09:46 PM, Zhang Yanfei wrote: > 于 2013年02月22日 09:55, Eric W. Biederman 写道: >> Sasha Levin writes: >> >>> 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 agai

Re: [PATCH] kexec: prevent double free on image allocation failure

2013-02-21 Thread Zhang Yanfei
于 2013年02月22日 09:55, Eric W. Biederman 写道: > Sasha Levin writes: > >> 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

Re: [PATCH] kexec: prevent double free on image allocation failure

2013-02-21 Thread Sasha Levin
On 02/21/2013 08:55 PM, ebied...@xmission.com wrote: > Sasha Levin writes: > >> 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 th

Re: [PATCH] kexec: prevent double free on image allocation failure

2013-02-21 Thread Eric W. Biederman
Sasha Levin writes: > 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 u

[PATCH] kexec: prevent double free on image allocation failure

2013-02-21 Thread Sasha Levin
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-