The patch titled Decompressors: check for read errors in decompress_unlzma.c has been removed from the -mm tree. Its filename was decompressors-check-for-read-errors-in-decompress_unlzmac.patch This patch was dropped because it was merged into mainline or a subsystem tree The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: Decompressors: check for read errors in decompress_unlzma.c From: Lasse Collin <lasse.collin@xxxxxxxxxxx> Return value of rc->fill() is checked in rc_read() and error() is called when needed, but then the code continues as if nothing had happened. rc_read() is a void function and it's on the top of performance critical call stacks, so propagating the error code via return values doesn't sound like the best fix. It seems better to check rc->buffer_size (which holds the return value of rc->fill()) in the main loop. It does nothing bad that the code runs a little with unknown data after a failed rc->fill(). This fixes an infinite loop in initramfs decompression if the LZMA-compressed initramfs image is corrupt. Signed-off-by: Lasse Collin <lasse.collin@xxxxxxxxxxx> Cc: "H. Peter Anvin" <hpa@xxxxxxxxx> Cc: Alain Knaff <alain@xxxxxxxx> Cc: Albin Tonnerre <albin.tonnerre@xxxxxxxxxxxxxxxxxx> Cc: Phillip Lougher <phillip@xxxxxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- lib/decompress_unlzma.c | 3 +++ 1 file changed, 3 insertions(+) diff -puN lib/decompress_unlzma.c~decompressors-check-for-read-errors-in-decompress_unlzmac lib/decompress_unlzma.c --- a/lib/decompress_unlzma.c~decompressors-check-for-read-errors-in-decompress_unlzmac +++ a/lib/decompress_unlzma.c @@ -631,6 +631,8 @@ STATIC inline int INIT unlzma(unsigned c if (cst.rep0 == 0) break; } + if (rc.buffer_size <= 0) + goto exit_3; } if (posp) @@ -638,6 +640,7 @@ STATIC inline int INIT unlzma(unsigned c if (wr.flush) wr.flush(wr.buffer, wr.buffer_pos); ret = 0; +exit_3: large_free(p); exit_2: if (!output) _ Patches currently in -mm which might be from lasse.collin@xxxxxxxxxxx are origin.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html