The patch titled Subject: lib/lzo/lzo1x_compress.c: fix alignment bug in lzo-rle has been added to the -mm tree. Its filename is lib-lzo-fix-alignment-bug-in-lzo-rle.patch
This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/lib-lzo-fix-alignment-bug-in-lzo-rl... and later at http://ozlabs.org/~akpm/mmotm/broken-out/lib-lzo-fix-alignment-bug-in-lzo-rl...
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/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next and is updated there every 3-4 working days
------------------------------------------------------ From: Dave Rodgman dave.rodgman@arm.com Subject: lib/lzo/lzo1x_compress.c: fix alignment bug in lzo-rle
Fix an unaligned access which breaks on platforms where this is not permitted (e.g., Sparc).
Link: http://lkml.kernel.org/r/20190912145502.35229-1-dave.rodgman@arm.com Signed-off-by: Dave Rodgman dave.rodgman@arm.com Cc: Dave Rodgman dave.rodgman@arm.com Cc: Markus F.X.J. Oberhumer markus@oberhumer.com Cc: Minchan Kim minchan@kernel.org Cc: stable@vger.kernel.org Signed-off-by: Andrew Morton akpm@linux-foundation.org ---
lib/lzo/lzo1x_compress.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-)
--- a/lib/lzo/lzo1x_compress.c~lib-lzo-fix-alignment-bug-in-lzo-rle +++ a/lib/lzo/lzo1x_compress.c @@ -83,17 +83,19 @@ next: ALIGN((uintptr_t)ir, 4)) && (ir < limit) && (*ir == 0)) ir++; - for (; (ir + 4) <= limit; ir += 4) { - dv = *((u32 *)ir); - if (dv) { + if (IS_ALIGNED((uintptr_t)ir, 4)) { + for (; (ir + 4) <= limit; ir += 4) { + dv = *((u32 *)ir); + if (dv) { # if defined(__LITTLE_ENDIAN) - ir += __builtin_ctz(dv) >> 3; + ir += __builtin_ctz(dv) >> 3; # elif defined(__BIG_ENDIAN) - ir += __builtin_clz(dv) >> 3; + ir += __builtin_clz(dv) >> 3; # else # error "missing endian definition" # endif - break; + break; + } } } #endif _
Patches currently in -mm which might be from dave.rodgman@arm.com are
lib-lzo-fix-alignment-bug-in-lzo-rle.patch
linux-stable-mirror@lists.linaro.org