]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
powerpc/32: Fix again csum_partial_copy_generic()
authorChristophe Leroy <christophe.leroy@c-s.fr>
Fri, 26 Aug 2016 14:45:13 +0000 (16:45 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 24 Sep 2016 08:09:37 +0000 (10:09 +0200)
commit63cbe6ea3b9dfaf4761cca70fda448b974ede463
treef82fe741d13626a70364fbdc15265f3fa370deda
parent13c2ad632e69f96e0ab33439745b084d93319522
powerpc/32: Fix again csum_partial_copy_generic()

commit 8540571e01f973d321b0821f4f32ed6e9ae8263c upstream.

Commit 7aef4136566b0 ("powerpc32: rewrite csum_partial_copy_generic()
based on copy_tofrom_user()") introduced a bug when destination address
is odd and len is lower than cacheline size.

In that case the resulting csum value doesn't have to be rotated one
byte because the cache-aligned copy part is skipped so no alignment
is performed.

Fixes: 7aef4136566b0 ("powerpc32: rewrite csum_partial_copy_generic() based on copy_tofrom_user()")
Cc: stable@vger.kernel.org # v4.6+
Reported-by: Alessio Igor Bogani <alessio.bogani@elettra.eu>
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Tested-by: Alessio Igor Bogani <alessio.bogani@elettra.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/powerpc/lib/checksum_32.S