]> git.baikalelectronics.ru Git - kernel.git/commit
bzip2/lzma/gzip: pre-boot malloc doesn't return NULL on failure
authorPhillip Lougher <phillip@lougher.demon.co.uk>
Mon, 14 Dec 2009 21:45:19 +0000 (21:45 +0000)
committerH. Peter Anvin <hpa@zytor.com>
Tue, 15 Dec 2009 22:04:12 +0000 (14:04 -0800)
commit9b6a555a04f11472ae35ea3e600a0d1004122f8d
treeb75700eb5160c026761f20e74010406a7fe58bec
parent14600d301cbe36d9e42374033019058813d9cb2d
bzip2/lzma/gzip: pre-boot malloc doesn't return NULL on failure

The trivial malloc implementation used in the pre-boot environment by the
decompressors returns a bad pointer on failure (falling through after
calling error).  This is doubly wrong - the callers expect malloc to
return NULL on failure, second the error function is intended to be
used by the decompressors to propagate errors to *their* callers.  The
decompressors have no access to any state set by the error function.

Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
LKML-Reference: <4b26b1ef.hIInb2AYPMtImAJO%phillip@lougher.demon.co.uk>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
include/linux/decompress/mm.h