]> git.baikalelectronics.ru Git - kernel.git/commit
lib: fix the use of LZO to decompress initramfs images
authorAlbin Tonnerre <albin.tonnerre@free-electrons.com>
Fri, 23 Apr 2010 17:17:58 +0000 (13:17 -0400)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 24 Apr 2010 18:31:25 +0000 (11:31 -0700)
commita2b48b8476197e93708d6fd8d3f8789b9e9891df
tree96b938147966ecfbffdb6d12fa630cf0b4931952
parent1c11389730844b0b0875540221d2a6d711f2b402
lib: fix the use of LZO to decompress initramfs images

This patch fixes 2 issues with the LZO decompressor:

- It doesn't handle the case where a block isn't compressed at all.  In
  this case, calling lzo1x_decompress_safe will fail, so we need to just
  use memcpy() instead (the upstream LZO code does something similar)

- Since commit 6511de38dcdb64e02ff0be4478b8bd8d71ec7b91 ("initramfs: add
  missing decompressor error check") , the decompressor return code is
  checked in the init/initramfs.c The LZO decompressor didn't return the
  expected value, causing the initramfs code to falsely believe a
  decompression error occured

Signed-off-by: Albin Tonnerre <albin.tonnerre@free-electrons.com>
Tested-by: bert schulze <spambemyguest@googlemail.com>
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>
lib/decompress_unlzo.c