diff options
author | Phillip Lougher <phillip@lougher.demon.co.uk> | 2009-08-07 00:09:31 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-08-07 19:39:56 +0200 |
commit | b1af4315d823a2b6659c5b14bc17f7bc61878ef4 (patch) | |
tree | d9a04709f52c27f59a93875fd705dbed2c581b09 /kernel/smp.c | |
parent | bzip2/lzma/gzip: fix comments describing decompressor API (diff) | |
download | linux-b1af4315d823a2b6659c5b14bc17f7bc61878ef4.tar.xz linux-b1af4315d823a2b6659c5b14bc17f7bc61878ef4.zip |
bzip2/lzma: remove nasty uncompressed size hack in pre-boot environment
decompress_bunzip2 and decompress_unlzma have a nasty hack that subtracts
4 from the input length if being called in the pre-boot environment.
This is a nasty hack because it relies on the fact that flush = NULL only
when called from the pre-boot environment (i.e.
arch/x86/boot/compressed/misc.c). initramfs.c/do_mounts_rd.c pass in a
flush buffer (flush != NULL).
This hack prevents the decompressors from being used with flush = NULL by
other callers unless knowledge of the hack is propagated to them.
This patch removes the hack by making decompress (called only from the
pre-boot environment) a wrapper function that subtracts 4 from the input
length before calling the decompressor.
Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/smp.c')
0 files changed, 0 insertions, 0 deletions