The patch titled Subject: lib/decompress_unlz4: change module to work with new LZ4 module version has been added to the -mm tree. Its filename is lib-decompress_unlz4-change-module-to-work-with-new-lz4-module-version.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/lib-decompress_unlz4-change-module-to-work-with-new-lz4-module-version.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/lib-decompress_unlz4-change-module-to-work-with-new-lz4-module-version.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Sven Schmidt <4sschmid@xxxxxxxxxxxxxxxxxxxxxxxxx> Subject: lib/decompress_unlz4: change module to work with new LZ4 module version This patch updates the unlz4 wrapper to work with the updated LZ4 kernel module version. Link: http://lkml.kernel.org/r/1485113717-29261-3-git-send-email-4sschmid@xxxxxxxxxxxxxxxxxxxxxxxxx Signed-off-by: Sven Schmidt <4sschmid@xxxxxxxxxxxxxxxxxxxxxxxxx> Cc: Bongkyu Kim <bongkyu.kim@xxxxxxx> Cc: Rui Salvaterra <rsalvaterra@xxxxxxxxx> Cc: Sergey Senozhatsky <sergey.senozhatsky@xxxxxxxxx> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> Cc: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> Cc: David S. Miller <davem@xxxxxxxxxxxxx> Cc: Anton Vorontsov <anton@xxxxxxxxxx> Cc: Colin Cross <ccross@xxxxxxxxxxx> Cc: Kees Cook <keescook@xxxxxxxxxxxx> Cc: "Tony Luck" <tony.luck@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- lib/decompress_unlz4.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff -puN lib/decompress_unlz4.c~lib-decompress_unlz4-change-module-to-work-with-new-lz4-module-version lib/decompress_unlz4.c --- a/lib/decompress_unlz4.c~lib-decompress_unlz4-change-module-to-work-with-new-lz4-module-version +++ a/lib/decompress_unlz4.c @@ -72,7 +72,7 @@ STATIC inline int INIT unlz4(u8 *input, error("NULL input pointer and missing fill function"); goto exit_1; } else { - inp = large_malloc(lz4_compressbound(uncomp_chunksize)); + inp = large_malloc(LZ4_compressBound(uncomp_chunksize)); if (!inp) { error("Could not allocate input buffer"); goto exit_1; @@ -136,7 +136,7 @@ STATIC inline int INIT unlz4(u8 *input, inp += 4; size -= 4; } else { - if (chunksize > lz4_compressbound(uncomp_chunksize)) { + if (chunksize > LZ4_compressBound(uncomp_chunksize)) { error("chunk length is longer than allocated"); goto exit_2; } @@ -152,11 +152,14 @@ STATIC inline int INIT unlz4(u8 *input, out_len -= dest_len; } else dest_len = out_len; - ret = lz4_decompress(inp, &chunksize, outp, dest_len); + + ret = LZ4_decompress_fast(inp, outp, dest_len); + chunksize = ret; #else dest_len = uncomp_chunksize; - ret = lz4_decompress_unknownoutputsize(inp, chunksize, outp, - &dest_len); + + ret = LZ4_decompress_safe(inp, outp, chunksize, dest_len); + dest_len = ret; #endif if (ret < 0) { error("Decoding failed"); _ Patches currently in -mm which might be from 4sschmid@xxxxxxxxxxxxxxxxxxxxxxxxx are lib-update-lz4-compressor-module.patch lib-decompress_unlz4-change-module-to-work-with-new-lz4-module-version.patch crypto-change-lz4-modules-to-work-with-new-lz4-module-version.patch fs-pstore-fs-squashfs-change-usage-of-lz4-to-work-with-new-lz4-version.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