Re: [PATCH 07/13] kexec: Implementation of new syscall kexec_file_load

Borislav Petkov
2014-06-16T22:11:12Z

On Mon, Jun 16, 2014 at 05:43:13PM -0400, Vivek Goyal wrote:
> Actually currently I am using vzalloc() for command line buffer
> allocation.
>
> image->cmdline_buf = vzalloc(cmdline_len);
> if (!image->cmdline_buf)
> goto out;
>
> Should I switch to using kzalloc() instead?

Well, vzalloc could trigger the OOM killer, can't it, for the right
size? If so, then we will have a serious problem.

And this snippet above is down the syscall path.

--
Regards/Gruss,
Boris.

Sent from a fat crate under my desk. Formatting is fine.
--