]> git.itanic.dy.fi Git - linux-stable/commit
powerpc: Restore registers on error exit from csum_partial_copy_generic()
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Tue, 1 Oct 2013 07:11:35 +0000 (17:11 +1000)
committerBen Hutchings <ben@decadent.org.uk>
Sat, 26 Oct 2013 20:06:07 +0000 (21:06 +0100)
commit0b2d10f8f2e686c9f4b718251765f09f77ee8088
tree796aa062e958b98cb99b4ab77c6b4525069eae8c
parent13ce0c4a399a654effc40a9a57e87ac23cf19267
powerpc: Restore registers on error exit from csum_partial_copy_generic()

commit 8f21bd0090052e740944f9397e2be5ac7957ded7 upstream.

The csum_partial_copy_generic() function saves the PowerPC non-volatile
r14, r15, and r16 registers for the main checksum-and-copy loop.
Unfortunately, it fails to restore them upon error exit from this loop,
which results in silent corruption of these registers in the presumably
rare event of an access exception within that loop.

This commit therefore restores these register on error exit from the loop.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
[bwh: Backported to 3.2: register name macros use lower-case 'r']
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
arch/powerpc/lib/checksum_64.S