]> git.baikalelectronics.ru Git - kernel.git/commit
initrd: fix lz4 decompress with initrd
authorYinghai Lu <yinghai@kernel.org>
Fri, 8 Aug 2014 21:23:10 +0000 (14:23 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 8 Aug 2014 22:57:26 +0000 (15:57 -0700)
commita600900d3d69742cb71b575d1434dcd85ac1e2fe
tree518c9d3b9e62fcc04669363e9f9235a39872d536
parentd9d555c0acecebbad2626a94e41fa126523b02ca
initrd: fix lz4 decompress with initrd

During testing initrd (>2G) support, find decompress/lz4 does not work
with initrd at all.

decompress_* should support:
1. inbuf[]/outbuf[] for kernel preboot.
2. inbuf[]/flush() for initramfs
3. fill()/flush() for initrd.

in the unlz4 does not handle case 3, as input len is passed as 0, and it
failed in first try.

Fix that add one extra if (fill) checking, and get out if EOF from the
fill().

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: Kyungsik Lee <kyungsik.lee@lge.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
lib/decompress_unlz4.c